/nestjs-crash-course

Repository for notes and putting into practice what was taught in the course

Primary LanguageTypeScript

NestJS Crash Course: Everything you need to know!

Sumary

Description

Topics

  • Starting a new project
  • 3 Layer architecture
  • Configuring endpoints
  • Creating a new module
  • Parsing URL params
  • Exemple of dependency Injection
  • Body parsing, DTOs, and entities
  • Swagger OpenAPI Docs
  • Parsing query parameters
  • Exception and error handling
  • Pipes intro
  • Validation intro
  • Using the CLI to generate CRUD

Dependecies

  • Nest - framework TypeScript
  • Node.js - is an open-source, cross-platform JavaScript runtime environment
  • Class-validator - Allows use of decorator and non-decorator based validation

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