NestJS Tutorial for Beginners - Build a Nest JS API in 2022 ✅

preview_player
Показать описание
In this tutorial you will learn about the NestJS components such as: Controllers, Providers, Modules, Middlewares, Exception Filters, Pipes, Guards, Interceptors and many more in 15 minutes with easy to understand examples.

NestJS is a blessing for developing backend applications.

Controllers are responsible for handling incoming requests and returning responses to the client.

Providers are a fundamental concept in Nest JS. Many of the basic Nest classes may be treated as a provider – services, repositories, factories, helpers, and so on.

Middleware is a function which is called before the route handler, have access to the request and response objects and the next() middleware function in the application’s request-response cycle.

Pipes should implement the PipeTransform interface and are used to validate and transform inputs.

Guards should implement the CanActivate interface and are used to block the requests based on some conditions.

Interceptors should implement the NestInterceptor interface.

This is the first tutorial from a course series about NestJS!
Subscribe and activate notifications to receive the newest videos!

—--------------------------------------------------
Timestamps:

00:00 - Intro
01:57 - Project Setup
03:28 - Controller
04:31 - Providers
05:46 - Middlewares
07:29 - Exceptions / Filters
08:30 - Pipes
10:43 - Guards
13:23 - Interceptors
14:41 - Webpack Hot Reload

--------------------------------------------
npm install --save join
npm install --save-dev @types/joi

Class Validator:
npm i --save class-validator class-transformer

Commands:
npm i -g @nestjs/cli // install the nestjs CLI
nest new project-name // create a new project

Hot Reload:
npm i --save-dev webpack-node-externals run-script-webpack-plugin webpack

Generate a new Feature boilerplate: nest g resource questions –no-spec
Рекомендации по теме
Комментарии
Автор

Great video, more Nest.JS please and maybe some Nest.JS and Next.JS auth example with cookies :D

codernerd