csdev19 / nest-boilerplate

πŸ”₯ Nest boilerplate to create projects as fast as possible πŸ”₯

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nest Boilerplate

πŸ”₯ Nest boilerplate to create projects as fast as possible πŸ”₯

Features

Code standards

  • The modules are plural (module-name.module.ts)
  • The controllers are plural and his path too (controller-name.controller.ts)
  • The services are plural (service-name.service.ts)
  • The entities are singular (entity-name.entity.ts)

Actual Folder structure

β”œβ”€β”€ dist/
β”œβ”€β”€ docker-compose.yml
β”œβ”€β”€ Dockerfile
β”œβ”€β”€ nest-cli.json
β”œβ”€β”€ package.json
β”œβ”€β”€ package-lock.json
β”œβ”€β”€ README.md
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app.module.ts
β”‚   β”œβ”€β”€ main.ts
β”‚   └── modules/
β”‚       β”œβ”€β”€ <module-name>/
β”‚       β”‚   β”œβ”€β”€ <module-name>.module.ts
β”‚       β”‚   β”œβ”€β”€ dtos/
β”‚       β”‚   β”œβ”€β”€ entities/
β”‚       β”‚   β”œβ”€β”€ services/
β”‚       β”‚   └── interfaces/
β”‚       β”œβ”€β”€ authentication/
β”‚       β”‚   β”œβ”€β”€ authentication.controller.ts
β”‚       β”‚   β”œβ”€β”€ authentication.module.ts
β”‚       β”‚   β”œβ”€β”€ constants/
β”‚       β”‚   β”œβ”€β”€ decorators/
β”‚       β”‚   β”œβ”€β”€ dtos/
β”‚       β”‚   β”œβ”€β”€ encrypt/
β”‚       β”‚   β”œβ”€β”€ guards/
β”‚       β”‚   β”œβ”€β”€ services/
β”‚       β”‚   └── strategies/
β”‚       └── note
β”‚           β”œβ”€β”€ dtos/
β”‚           β”œβ”€β”€ interfaces/
β”‚           β”œβ”€β”€ note.controller.ts
β”‚           β”œβ”€β”€ note.entity.ts
β”‚           β”œβ”€β”€ note.module.ts
β”‚           └── note.service.ts
β”œβ”€β”€ test/
β”‚   β”œβ”€β”€ app.e2e-spec.ts
β”‚   └── jest-e2e.json
β”œβ”€β”€ tsconfig.build.json
└── tsconfig.json

Module structure

β”œβ”€β”€ <module-name>/
β”‚   β”œβ”€β”€ <module-name>.module.ts
β”‚   β”œβ”€β”€ dtos/
β”‚   β”œβ”€β”€ entities/
β”‚   β”œβ”€β”€ services/
β”‚   └── interfaces/

Contributors

  • Author - Cristian Sotomayor @csdev

Extra

If youy want to use snake-case go to this package

Docker

There is a docker-compose.yml file for starting Docker.

docker-compose up

After running the sample, you can stop the Docker container with

docker-compose down

docker-compose up -d postgres
docker-compose ps
docker-compose down

docker investigation

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

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

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.

About

πŸ”₯ Nest boilerplate to create projects as fast as possible πŸ”₯


Languages

Language:TypeScript 95.9%Language:JavaScript 2.9%Language:Shell 0.6%Language:Dockerfile 0.5%