Skip to content

hsrvms/nestjs-backend-template

Repository files navigation

Table of Contents

  1. Description
  2. Project setup
  3. Resources
  4. Multiple ENV Config
  5. Features

Description

Backend template written in TypeScript with NestJS

Project setup

$ npm install
# To use NestJS CLI install it globally
$ npm i -g @nestjs/cli

Compile and run the project

Docker is highly recommended for development. Please make sure that Docker Engine is installed in your PC. There is basically configured multi-stage Dockerfile which can be used for deployment and development purposes in this repository.

# development
$ docker compose up

# if there is an existing docker image built before and fresh build needed
$ docker compose up --build

# for detached terminal
$ docker compose up -d

Run tests

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

Resources

Visit the NestJS Documentation to learn more about the framework.

Multiple ENV Config

.env files has been choosen by the current NODE_ENV situation. If NODE_ENV=development the choosen env file would be ./config/env/development.env

After changing the .env files they should be validated in ./config/validation.ts file for better development experience. Also they can be added into ./config/FILE_NAME.config.ts file to use them easily. This documentation would be helpful for those who are new in NestJS.

Features

  1. Auth
  2. Users

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published