Skip to content

agger34/nestjs-template

Repository files navigation

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

NPM Version Package License NPM Downloads CircleCI Coverage Discord Backers on Open Collective Sponsors on Open Collective Support us

Description

Nest framework TypeScript starter repository.

Installation

npm install

Running the app

# development
$ npm run start

# watch mode
$ npm run start:dev

# production mode
$ npm run start:prod

# via docker-compose
$ docker-compose up -d

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

Folder Structure

# 1. Overview
├───src
│   ├───database     # Database provider files, ex: mongodb, mysql
│   ├───decorator    # Decorator files, ex: @Roles
│   ├───guard        # Guard files, ex: JwtAuthGuard
│   ├───middleware   # Middleware files, ex: Logger
│   ├───module       # Source files, internal and external modules
│   │   ├───auth
│   │   ├───todo     # A sample todo modules include
│   │   └───user
│   ├───script       # Script files to run other process built with NestJs also
│   └───shared       # Enum, Constant, Helper.. to share across the system
└───test

# 2. Sample module details
.      
├───module
│   ├───todo
│   │       todo.controller.ts
│   │       todo.dto.ts
│   │       todo.enum.ts
│   │       todo.interface.ts
│   │       todo.module.ts
│   │       todo.providers.ts
│   │       todo.repository.ts
│   │       todo.schema.ts
│   │       todo.service.ts

Features

  • Database: mongoose.
  • Passport.
  • Logging: Winston.
  • Config.
  • Swagger.
  • Eslint
  • Prettier
  • Docker And Docker Compose.

Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.

Stay in touch

License

Nest is MIT licensed.