Tarek-Siddique-Nabil / Fastify-Drizzle-Template

Fastify-Drizzle Orm Boilerplate

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fastify-Drizzle Orm Boilerplate

Tech Stack

Server: fastify , drizzle-orm, postgresql

Installation

Install

  cd project-name
  npm i
  cd project-name
  pnpm i

Devolopment

(first Migration than start your development )

  cd project-name
  npm run dev
  cd project-name
  pnpm run dev

Build

  cd project-name
  npm run build
  cd project-name
  pnpm run build

Migration / Generate sql

  cd project-name
  npm run generate
  cd project-name
  pnpm run generate

Migration Push in Db

  cd project-name
  npm run push
  cd project-name
  pnpm run push

Migration Delete / drop

  cd project-name
  npm run drop
  cd project-name
  pnpm run drop

Drizzle Studio

  cd project-name
  npm run studio
  cd project-name
  pnpm run studio

If you want to use another sql database instead postgresql

  "generate": "drizzle-kit generate:pg",
  "push": "drizzle-kit push:pg",

instead

  "generate":"drizzle-kit generate:mysql",
  "push": "drizzle-kit push:mysql",
  "generate":"drizzle-kit generate:sqlite",
  "push": "drizzle-kit push:sqlite",

FAQ

Why Fastify ?

Fastify is the top choice for building highly performant web servers in Node.js. With its schema-based approach and robust TypeScript support, it provides a seamless and efficient development experience.

Why drizzle-orm ?

Opting for Drizzle-ORM is a strategic move towards lightweight and high-performance database operations. Its superiority over Prisma, coupled with excellent TypeScript support and a distinct schema declaration method, makes it the preferred choice for developers seeking optimal database interaction.

About

Fastify-Drizzle Orm Boilerplate


Languages

Language:TypeScript 100.0%