Mô tả

This Course in a Nutshell

If you don't know NestJs, it's like Angular but for the backend. With it, we can write our backend using the same concepts and object-oriented APIs that we already use to structure our Angular frontend: components, services, modules, pipes, etc.

NestJs is also quite similar to popular libraries that you might already be used to, such as, for example, the Spring library in the Java ecosystem, or ASP.NET MVC for the C# ecosystem.

Course Overview

In this course, you are going to learn from scratch how to design and develop a NestJs backend that will take the form of a REST API that queries a MongoDB database using the Mongoose ODM (Object Document Mapping) library. We will be providing a complete CRUD example showing how to perform the most common REST data retrieval and data modification operations using NestJs.

No prior NestJs, MongoDB or Mongoose knowledge is assumed as we will explain everything from scratch. We will cover all the essential NestJs concepts such as Modules, Controllers and injectable services.

We will learn in detail how to validate business data using a decorator based approach (with decorators like @IsString(), @IsPhoneNumber(), etc.) by leveraging the built-in NestJs Validation pipe.

We will also implement using NestJs commonly needed backend security functionality such as User Authentication, RBAC (Role-Based Access Control) Authorization, error handling, and cover more advanced NestJs concepts such as Filters, Pipes, Guards, interceptors and middleware.

Table of Contents

This course covers the following topics:

  • Introduction to NestJs

  • Running NestJs in Hot Reload and Debug mode

  • Writing our first NestJs REST endpoint

  • NestJs Modules, Controllers and injectable Services

  • Introduction to MongoDB

  • Setting up a cloud MongoDB database

  • Introduction to the Mongoose ODM library

  • Querying MongoDB from a NestJs REST endpoint

  • Complete CRUD example with NestJs and MongoDB

  • NestJs Filters and custom error handling

  • NestJs Pipes, building a custom pipe

  • Data Validation with class-validator and the Validation pipe

  • NestJs Middleware

  • User Authentication with NestJs

  • NestJs RBAC (Role-Based Access Control) Authorization

  • NestJs Guards

What Will You Learn In this Course?

After taking this course, you will feel comfortable designing and developing applications using NestJs. You will have learned everything that you need to know in practice for designing and developing production-ready secure backends using the NestJs framework.

Bạn sẽ học được gì

Code in Github repository with downloadable ZIP files per section

NestJs Deep Dive - Modules, Controllers, Services, Pipes, Middleware, Guards, etc.

NestJs Design Patterns - Controllers and Repositories

Complete NestJs / MongoDB CRUD example

Mongoose ODM (Object to Document Mapping) library

Introduction to MongoDB

Decorator-based Data Validation

Authentication in NestJs with JSON Web Tokens (JWT)

NestJs RBAC Authorization (Role-Based Access Control)

Yêu cầu

  • No prior knowledge of NestJs or Angular is needed
  • Prior knowledge of Typescript is important

Nội dung khoá học

8 sections

Introduction

4 lectures
NestJs In Practice Course - Helicopter View
03:45
IMPORTANT - Recommended Software Versions
00:19
NestJs In Practice - Development Environment Setup
08:36
The Typescript Jumpstart Ebook
03:20

Introduction to the NestJs framework

4 lectures
Setting Up a NestJs Server from scratch
09:10
NestJs Hello World - First NestJs REST Endpoint
07:20
Running a NestJs Server in Hot Reload Mode
11:47
How to Debug a NestJs Backend using the Chrome Dev Tools
06:30

NestJs REST backend - CRUD Operations

9 lectures
Quick Guide to Setting Up a Cloud MongoDB database
04:13
Adding some sample data to our MongoDB database
05:47
Introduction to Mongoose and Schemaless databases
05:17
Setting Up Mongoose - Creating our first Schema
07:50
Implementing a NestJs Repository Service with Mongoose
08:36
NestJs CRUD Update - Parsing the HTTP request with @Param and @Body
07:36
NestJs CRUD Update - Repository Implementation
07:16
NestJs CRUD - Step-by-Step Delete Implementation
05:01
NestJs CRUD - Step-by-Step Create Implementation
08:23

NestJs Error Handling In Depth

5 lectures
Introduction to NestJs Error Handling
06:32
Introduction to the Restlet REST Client
03:41
NestJs Exception Filters - Step-by-Step Implementation
11:46
Understanding Mongoose Schema Validation
09:13
Setting Up a NestJs Fallback Global Exception Handler
05:39

NestJs Data Validation In Depth

5 lectures
NestJs Decorator-based Validation using Class Validator
05:32
Introduction to NestJs Pipes
04:03
NestJs Pipes - A Simple Example (ToIntegerPipe)
03:59
NestJS Data Validation with class-validator
05:29
NestJs ValidationPipe - How to use it
09:11

Practice Section - Implementing the Course Screen

4 lectures
Practice Lesson - Implementing the Course Screen
06:13
Defining a One To Many Relationship with Mongoose
03:43
Parsing NestJs HTTP GET queries with @Query
06:04
Practice Lesson - Finishing the Implementation of the Course Screen
08:06

NestJs Authentication and Authorization In Depth

11 lectures
Introduction to NestJs Backend Security
05:58
Initial Implementation of a NestJs Login Controller
05:16
NestJs Authentication - Login Controller Implementation
06:35
NestJs Authentication - Validating the User Password
05:04
Authenticating a User with JSON Web Tokens
10:12
Handling the Authentication JWT on the Angular client
07:40
Introduction to NestJs Midddleware
07:18
Get User NestJs Middleware - Step-by-Step Implementation
06:38
Ensuring User Authentication with a NestJs Guard
07:39
NestJs Authorization Guard - Step-by-Step Implementation
06:25
NestJs Administrators-Only Guard
04:19

Conclusion

2 lectures
Bonus Lecture
01:38
NestJs In Practice - Conclusions & Key Takeaways
06:47

Đánh giá của học viên

Chưa có đánh giá
Course Rating
5
0%
4
0%
3
0%
2
0%
1
0%

Bình luận khách hàng

Viết Bình Luận

Bạn đánh giá khoá học này thế nào?

image

Đăng ký get khoá học Udemy - Unica - Gitiho giá chỉ 50k!

Get khoá học giá rẻ ngay trước khi bị fix.