NestJs in Practice with MongoDB

It’s like Angular but for the backend! Build a modern REST backend with Typescript and the familiar Angular API
NestJs in Practice with MongoDB
File Size :
1.77 GB
Total length :
4h 41m



Angular University


Last update




NestJs in Practice with MongoDB

What you’ll learn

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)

NestJs in Practice with MongoDB


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


This Course in a NutshellIf 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 OverviewIn 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 ContentsThis course covers the following topics:Introduction to NestJsRunning NestJs in Hot Reload and Debug modeWriting our first NestJs REST endpointNestJs Modules, Controllers and injectable ServicesIntroduction to MongoDBSetting up a cloud MongoDB databaseIntroduction to the Mongoose ODM libraryQuerying MongoDB from a NestJs REST endpointComplete CRUD example with NestJs and MongoDBNestJs Filters and custom error handlingNestJs Pipes, building a custom pipeData Validation with class-validator and the Validation pipeNestJs MiddlewareUser Authentication with NestJsNestJs RBAC (Role-Based Access Control) AuthorizationNestJs GuardsWhat 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.


Section 1: Introduction

Lecture 1 NestJs In Practice Course – Helicopter View

Lecture 2 IMPORTANT – Recommended Software Versions

Lecture 3 NestJs In Practice – Development Environment Setup

Lecture 4 The Typescript Jumpstart Ebook

Section 2: Introduction to the NestJs framework

Lecture 5 Setting Up a NestJs Server from scratch

Lecture 6 NestJs Hello World – First NestJs REST Endpoint

Lecture 7 Running a NestJs Server in Hot Reload Mode

Lecture 8 How to Debug a NestJs Backend using the Chrome Dev Tools

Section 3: NestJs REST backend – CRUD Operations

Lecture 9 Quick Guide to Setting Up a Cloud MongoDB database

Lecture 10 Adding some sample data to our MongoDB database

Lecture 11 Introduction to Mongoose and Schemaless databases

Lecture 12 Setting Up Mongoose – Creating our first Schema

Lecture 13 Implementing a NestJs Repository Service with Mongoose

Lecture 14 NestJs CRUD Update – Parsing the HTTP request with @Param and @Body

Lecture 15 NestJs CRUD Update – Repository Implementation

Lecture 16 NestJs CRUD – Step-by-Step Delete Implementation

Lecture 17 NestJs CRUD – Step-by-Step Create Implementation

Section 4: NestJs Error Handling In Depth

Lecture 18 Introduction to NestJs Error Handling

Lecture 19 Introduction to the Restlet REST Client

Lecture 20 NestJs Exception Filters – Step-by-Step Implementation

Lecture 21 Understanding Mongoose Schema Validation

Lecture 22 Setting Up a NestJs Fallback Global Exception Handler

Section 5: NestJs Data Validation In Depth

Lecture 23 NestJs Decorator-based Validation using Class Validator

Lecture 24 Introduction to NestJs Pipes

Lecture 25 NestJs Pipes – A Simple Example (ToIntegerPipe)

Lecture 26 NestJS Data Validation with class-validator

Lecture 27 NestJs ValidationPipe – How to use it

Section 6: Practice Section – Implementing the Course Screen

Lecture 28 Practice Lesson – Implementing the Course Screen

Lecture 29 Defining a One To Many Relationship with Mongoose

Lecture 30 Parsing NestJs HTTP GET queries with @Query

Lecture 31 Practice Lesson – Finishing the Implementation of the Course Screen

Section 7: NestJs Authentication and Authorization In Depth

Lecture 32 Introduction to NestJs Backend Security

Lecture 33 Initial Implementation of a NestJs Login Controller

Lecture 34 NestJs Authentication – Login Controller Implementation

Lecture 35 NestJs Authentication – Validating the User Password

Lecture 36 Authenticating a User with JSON Web Tokens

Lecture 37 Handling the Authentication JWT on the Angular client

Lecture 38 Introduction to NestJs Midddleware

Lecture 39 Get User NestJs Middleware – Step-by-Step Implementation

Lecture 40 Ensuring User Authentication with a NestJs Guard

Lecture 41 NestJs Authorization Guard – Step-by-Step Implementation

Lecture 42 NestJs Administrators-Only Guard

Section 8: Conclusion

Lecture 43 Bonus Lecture

Lecture 44 NestJs In Practice – Conclusions & Key Takeaways

Web Developers in general, looking for a detailed guide to the NestJs framework,Angular Developers, looking to reuse some of the same Angular concepts and apply them to the backend as well

Course Information:

Udemy | English | 4h 41m | 1.77 GB
Created by: Angular University

You Can See More Courses in the Developer >> Greetings from

New Courses

Scroll to Top