
在本课程中,您将从头开始学习如何设计和开发 NestJs 后端,该后端将采用 REST API 的形式,使用 Mongoose ODM(对象文档映射)库查询 MongoDB 数据库。我们将提供一个完整的 CRUD 示例,展示如何使用 NestJs 执行最常见的 REST 数据检索和数据修改操作。
因为我们将从头开始解释所有内容,所以没有假设之前的 NestJs、MongoDB 或 Mongoose 知识。我们将涵盖所有基本的 NestJs 概念,例如模块、控制器和可注入服务。
我们将通过利用内置的 NestJs 验证管道详细了解如何使用基于装饰器的方法(使用 @IsString()、@IsPhoneNumber() 等装饰器)来验证业务数据。
我们还将使用 NestJs 实现常用的后端安全功能,例如用户身份验证、RBAC(基于角色的访问控制)授权、错误处理,并涵盖更高级的 NestJs 概念,例如过滤器、管道、守卫、拦截器和中间件。
目录
本课程涵盖以下主题
NestJs 简介
在热重载和调试模式下运行 NestJs
编写我们的第一个 NestJs REST 端点
NestJs 模块、控制器和可注入服务
MongoDB简介
设置云 MongoDB 数据库
Mongoose ODM 库介绍
从 NestJs REST 端点查询 MongoDB
使用 NestJs 和 MongoDB 完成 CRUD 示例
NestJs 过滤器和自定义错误处理
NestJs Pipes,构建自定义管道
使用类验证器和验证管道进行数据验证
NestJs 中间件
使用 NestJs 进行用户身份验证
NestJs RBAC(基于角色的访问控制)授权
NestJs 守卫
您将在本课程中学到什么?
完成本课程后,您将能够轻松地使用 NestJs 设计和开发应用程序。您将学到在实践中使用 NestJs 框架设计和开发生产就绪的安全后端所需了解的一切。
本课程一般面向
Web 开发人员,寻找 NestJs 框架
Angular 开发人员的详细指南,希望重用一些相同的 Angular 概念并将它们也应用到后端
It’s like Angular but for the backend! Build a modern REST backend with Typescript and the familiar Angular API
Updated 06/2022
Genre: eLearning | MP4 | Video: h264, 1280×720 | Audio: AAC, 44.1 KHz
Language: English | Size: 1.21 GB | Duration: 44 lectures • 4h 41m
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
原创文章,作者:steven,如若转载,请注明出处:https://rr3d.cn/34952.html