Skip to content

Nest.JS REST API boilerplate code using mongoose, docker, docker-compose, typescript

Notifications You must be signed in to change notification settings

rastislavkopal/nestjs-rest-api-boilerplate-mongoose

Repository files navigation

Nest Logo

Fact checking API

users_service CI

Features

  • framework TypeScript starter repository(Nest)
  • ES2017 latest features like Async/Await
  • Authentication and Authorization with passport
  • Continuous integration support with Github Actions

Requirements

Getting Started

Install dependencies:

$ npm install

Set environment variables:

$ cp .env.example .env

Docker

Comfortable development with docker support:

# run containers locally
$ npm run docker:dev

# run container in production
npm run docker:prod

# run tests
npm run docker:test

Running Locally

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

Running in Production

$ npm run start:prod

Lint

# lint code with ESLint
$ npm run lint

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

Validate

# run lint and tests
$ npm run lint