Skip to content

starter-kits-usmb/back-nestjs

Repository files navigation

NestJS Starter Kit

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

  • A README.md file with a description of the project and how to run it
  • Scalable folder structure
  • Linter and prettier
  • Authentification with JWT.
  • Auth guard for routes
  • Database setup (postgres)
  • Swagger documentation available at /api
  • Test setup
  • docker compose file for development & production
  • TypeOrm

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published