Before you proceed, it's probably worth it to check the:
- Database (typeorm).
- Seeding.
- Config Service (@nestjs/config).
- Sign in, sign up and fetch profile.
- Swagger.
- E2E tests.
- Simple Docker Containerization.
git clone --depth 1 https://github.com/iAmCodeHead/NestJs-Production-Boilerplate.git my-app
cd my-app/
cp env-example .env
docker compose up -d
For check status run
docker compose logs
git clone --depth 1 https://github.com/iAmCodeHead/NestJs-Production-Boilerplate.git my-app
cd my-app/
cp env-example .env
Change DATABASE_HOST=postgres
to DATABASE_HOST=localhost
Run additional container:
docker compose up -d postgres
npm install
npm run migration:run
npm run seed:run
npm run start:dev
- Swagger: http://localhost:3000/docs
Generate migration
npm run migration:generate -- src/database/migrations/CreateNameTable
Run migration
npm run migration:run
Revert migration
npm run migration:revert
Drop all tables in database
npm run schema:drop
Run seed
npm run seed:run
(# e2e tests)
(npm run test:e2e)