NOTE: Before using this template, you need to install
pnpm
.
Create a new project based on this template using degit
:
pnpx degit CitRUSprod/fastify-starter my-app
cd my-app
pnpm i
Run in development mode:
pnpm dev
Build and run in production mode:
pnpm build
pnpm start
Links:
- http://localhost:6500 - API
- http://localhost:6500/docs - API documentation
Database operations with prisma
:
pnpm prisma:generate
pnpm prisma:studio
pnpm prisma:migrations:create
pnpm prisma:migrations:run
pnpm prisma:migrations:reset
pnpm prisma:seeds:run
Commit with commitizen
:
pnpm commit
Check types with tsc
:
pnpm validate
Lint with prettier
and eslint
:
pnpm lint
Format with prettier
and eslint
:
pnpm format
All environment variables are written to the .env
file. If it doesn't exist, just enter this command:
cp .env.example .env
NOTE: Before using the database from this template, you need to install
docker
anddocker compose
.
Start and stop the postgres
database:
db/start
db/stop