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)
Requirements
- No prior knowledge of NestJs or Angular is needed
- Prior knowledge of Typescript is important
Description
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.
Who this course is for:
- 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
Instructor
Hello, I'm Vasco Cavalheiro and I'm an online instructor at the Angular University.
Over the years I have helped over 100k developers to learn the Angular framework and its surrounding ecosystem of technologies.
Check out my Linkedin in the links section on the top right.
About the Angular University:
The Angular University aims to be the one place that you go in order to learn and keep up with the whole Angular ecosystem. We provide premium quality video tutorials, screencast style.
No matter if you are a beginner, intermediate or advanced in Angular, we have several courses for you.
More about me:
I'm a Software Developer with many years of experience, very seasoned building user interfaces with Angular. I've worked as a Frontend Developer/Architect in a large variety of enterprise projects throughout the years.
I worked on a ton of projects, everything from single page applications to help build the European Criminal Record Information Exchange System, to brand new e-banking portals, to corporate banking portals, and more. I've been a key part of internal framework teams that built frameworks for in-house departments of tens of developers.
I also love to teach, write and talk about technology. I am looking forward to be your Angular instructor,
Kind Regards,
Vasco