Skip to content

👽 REST API's using Nest.js, mongoose, authentication and authorization

Notifications You must be signed in to change notification settings

msjadhav03/ts-nest-mongoose-crud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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 Donate us Support us Follow us on Twitter

Description

This is a todo application using Nest.js. It has encorporated all the authentication code. Also it has user REST'API.

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

Swagger

Swagger Swagger

About Nest.js

Overview

Creating resource

Brief of folder tree

Routing

StatusCode

Header

Route Parameters

Request Payload

ValidationPip

Injectable()

  • Dependency Injection
  • Optional Providers
  • Property-based Injection

Module()

  • Feature Modules
  • Shared Modules
  • Module re-exporting
  • Dependency Injection
  • Global Modules
  • Dynamic Modules

Middleware

Exception filters

  • Throwing standard exceptions
  • Custom exceptions
  • Built-in HTTP exceptions

Pipes

  • Built in pipes
  • Binding pipes
  • Custom pipes
  • Schema based validation
  • Object Schema Validation
  • Binding validation pipes
  • class validator
  • Global Scoped pipes

Guards

  • Authorization guard
  • Execution context
  • Role-based authentication
  • Binding guards

Custom route decorators

Unit Testing

Stay in touch

License

Nest is [ISC Licence]