Production-ready starter for:
- NestJS 11
- Prisma ORM
- PostgreSQL (Docker)
Start only PostgreSQL in Docker:
docker compose up -d postgresInstall dependencies and generate Prisma client:
npm install
npm run prisma:generatePush schema to DB and run app:
npm run prisma:db:push
npm run start:devnpm run docker:startStop and remove containers and volume:
npm run docker:downnpm run prisma:generate
npm run prisma:db:push
npm run prisma:migrate:dev
npm run prisma:migrate:deploy
npm run prisma:studioCopy .env.example to .env if needed. Default values are already set for local development:
PORT=3000DATABASE_URL=postgresql://postgres:postgres@localhost:5432/milos_milbyte?schema=public
When running inside Docker Compose, the app uses:
postgresql://postgres:postgres@postgres:5432/milos_milbyte?schema=public
For subscription emails, configure these SMTP variables in your environment:
SMTP_HOSTSMTP_PORTSMTP_USERSMTP_PASSSMTP_FROM(optional)
GET /returns app status messageGET /healthchecks API + database connection
- OpenAPI JSON + UI is available at
GET /docs - Local URL:
http://localhost:3000/docs
// admin token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjEsImVtYWlsIjoiYWRtaW5AZ21haWwuY29tIiwicm9sZSI6IlNVUEVSQURNSU4iLCJpYXQiOjE3NzgyNjg2ODEsImV4cCI6MTc3ODM1NTA4MX0.xfIG4cPQEaBGqqkQVi8HgktZpLrSPmX_RRFQuAxB6b8
// client token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOjIsImVtYWlsIjoiam9obkBnbWFpbC5jb20iLCJyb2xlIjoiQ0xJRU5UIiwiaWF0IjoxNzc4MjY4ODg5LCJleHAiOjE3NzgzNTUyODl9.yGKn0o225bMIkWOJcKd1rs0L3RotYNs40IVTom0WD-Q