starter-kits-usmb / back-nestjs

0 stars 0 forks source link

NestJS Starter Kit

This is a starter kit for NestJS projects. It includes the following:

Installation

$ npm install

Copy the .env.example file to .env and fill in the values.

Running the app for development

# start the database
$ docker-compose up -d

# start the app in development mode
$ npm run start:dev

Deploying the app

Copy the .env.prod.example file to .env.prod and fill in the values.

Uncomment the nestjs-app service, change .env to .env.prod for databaes service in docker-compose.yml and run the following command:

!!! danger Make sure that you have wrote the migrations for the database otherwise the app will not have the correct tables

# run docker build
$ docker-compose up -d --build

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov