This is an opinionated template for Nestjs prisma restful projects.
-
Platform: Express
-
Database:
-
Cache Manager: cache-manager
-
Logger: Pino
- nestjs-pino
- rotating-file-stream
- pino-pretty in development
- pino-loki
-
health
-
Authentication: Passport
- JWT: passport-jwt
- Google: passport-google-oauth20
-
Swagger: @nestjs/swagger
-
Tracing: nestjs-otel
-
k8s
Init environment variables:
cp .env.example .env
Install dependencies:
pnpm install
Generate Prisma client:
pnpm run prisma:migrate
Migrate database:
pnpm run prisma:migrate:dev
Run the app:
pnpm run start:dev
Docker:
docker-compose build
docker-compose up -d
In Node.js Environment:
pnpm install
pnpm run build
pnpm run start:prod
Development:
pnpm run prisma:migrate:dev
Production:
pnpm run prisma:migrate:deploy
swagger
opentelemetry
prometheus