Mô tả

Authentication/Authorization? Covered.  Automated Testing? Yep, it's here!  Production Deployment? Of course!

Congratulations! You've found the complete guide on how to build enterprise-ready apps with NestJS.

NestJS is a backend framework used to create scalable and reliable APIs.  It is a "battery-included" framework; it includes tools to handle just about every possible use case, from data persistence, to validation, to config management, to testing, and much, much more.  This course will help you master Nest. By the time you complete this course, you will have the confidence to build any app you can imagine.

Throughout this course you will build a series of apps with growing complexity.  We use as few libraries and tools as possible.  Instead, you will write many custom systems to better understand how every piece of Nest works together.  Each application you build includes discussion on data modeling and persistence. We will first save records in a simple file-based data store (built from scratch) and eventually work our way up to saving data in a production-grade Postgres instance.

Testing is a fundamental topic in Nest. A tremendous amount of functionality in Nest is dedicated to making sure your project is easy to test. This course follows Nest's testing recommendations, and you will write both integration and unit tests to ensure your project is working as expected. Although testing can sometimes be confusing and boring, I have put special care into making sure the tests we write are expressive, fast, and effective.  You will be able to use this knowledge on your own projects, even those that don't use Nest!

Typescript is used throughout this course to make sure we are writing clean and correct code. Don't know Typescript? Not a problem! A free appendix is included at the end of the course to get you up to speed on Typescript.  Once you're familiar with it, Typescript will help you catch errors and bugs in your code before you even run it.  If you've never used Typescript before you are in for a treat :)

--------------------------------------

Everything in this course is designed to make your learning process as easy as possible.

  • At every step, I will teach you what Nest is doing internally, and help you understand how to twist and bend Nest to better suit your application's needs. 

  • Every single video in the course has an attached ZIP file containing up-to-date code, just in case you ever get stuck.

  • Full-time teaching assistants are standing by to help answer your questions

  • Access private live chat server is included. Live help whenever you need it!

--------------------------------------

Here's a partial list of the topics included in this course:

  • Securely deploy your app to production

  • Write automated integration and unit tests to make sure your code is working

  • Build an authentication system from scratch to log users in

  • Allow users to perform certain actions with a permissions system

  • Store and retrieve data with complex queries using TypeORM

  • Understand how TypeORM handles data relationships

  • Write declarative code using property, method, and parameter decorators

  • Master the concept of dependency injection to write reusable code

  • Implement automatic validation of incoming requests

  • Format outgoing response data with a custom DTO system

  • Handle incoming requests and outgoing responses using Guards and Interceptors

  • Segment your code into reusable Nest Modules

  • Add structure to your database using migrations


I had a tough time learning NestJS.  There are a tremendous number of outdated tutorials around it, the documentation is sometimes unclear, and Nest itself is just plain hard to understand.  I made this course to save you time and money - a course to show you exactly what you need to know about every topic in Nest.  You will find learning Nest to be a delightful experience and pick up a tremendous amount of knowledge along the way.

Sign up today and join me in mastering NestJS!

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

Deploy a feature-complete app to production

Build authentication and permissions systems from scratch

Write integration and unit tests to ensure your code is working

Automatically validate data included with incoming requests

Use an API client to manually test your app

Apply structure to your code with Typescript

Make your code more reusable and testable with dependency injection

Tie different types of data together with TypeORM relationships

Get a behind-the-scenes understanding of NestJS

Use Guards to prevent unauthorized users from gaining access to sensitive data

Understand Nest's special request-response cycle

Model your app's data using TypeORM entities

Use decorators to dramatically simplify your code

Yêu cầu

  • Basic understanding of Javascript

Nội dung khoá học

20 sections

Get Started Here!

3 lectures
How to Get Help
00:51
Join Our Community!
00:07
Course Resources
00:38

The Basics of Nest

6 lectures
Project Setup
04:04
TypeScript Configuration
05:36
Creating a Controller
07:03
Starting Up a Nest App
05:50
File Naming Conventions
04:35
Routing Decorators
02:47

Generating Projects with the Nest CLI

6 lectures
App Setup
07:42
Using the Nest CLI to Generate Files
06:10
More on Generating Files
04:11
Adding Routing Logic
04:04
[Optional] Postman Setup
04:47
[Optional] VSCode REST Client Extension
05:11

Validating Request Data with Pipes

6 lectures
Accessing Request Data with Decorators
05:38
Installing Extra Required Libraries
00:20
Using Pipes for Validation
03:02
Adding Validation Rules
07:36
Behind the Scenes of Validation
07:21
How Type Info is Preserved
06:14

Nest Architecture: Services and Repositories

10 lectures
Services and Repositories
06:11
Implementing a Repository
06:38
Reading and Writing to a Storage File
04:39
Implementing a Service
05:01
Manual Testing of the Controller
07:12
Reporting Errors with Exceptions
05:26
Understanding Inversion of Control
11:17
Introduction to Dependency Injection
09:25
Refactoring to Use Dependency Injection
07:35
Few More Notes on DI
05:49

Nest Architecture: Organizing Code with Modules

6 lectures
Project Overview
03:06
Generating a Few Files
04:42
Setting Up DI Between Modules
05:57
More on DI Between Modules
04:39
Consuming Multiple Modules
05:19
Modules Wrapup
01:53

Big Project Time!

4 lectures
App Overview
02:18
API Design
04:08
Module Design!
03:02
Generating Modules, Controllers, and Services
02:27

Persisting Data with TypeORM

9 lectures
Persistent Data with Nest
02:50
Setting Up a Database Connection
07:28
Creating an Entity and Repository
07:13
Viewing a DB's Contents
06:54
Understanding TypeORM Decorators
07:14
One Quick Note on Repositories
03:53
A Few Extra Routes
03:08
Setting Up Body Validation
07:15
Manual Route Testing
03:52

Creating and Saving User Data

11 lectures
Creating and Saving a User
08:58
Quick Breather and Review
05:53
More on Create vs Save
07:36
Required Update for find and findOne Methods
00:19
Querying for Data
04:41
Updating Data
11:24
Removing Users
03:44
Finding and Filtering Records
05:50
Removing Records
02:51
Updating Records
06:05
A Few Notes on Exceptions
06:48

Custom Data Serialization

8 lectures
Excluding Response Properties
05:50
Solution to Serialization
04:37
How to Build Interceptors
12:13
Serialization in the Interceptor
08:20
Customizing the Interceptor's DTO
03:02
Wrapping the Interceptor in a Decorator
03:07
Controller-Wide Serialization
02:48
A Bit of Type Safety Around Serialize
03:30

Authentication From Scratch

20 lectures
Authentication Overview
08:21
Reminder on Service Setup
04:15
Implementing Signup Functionality
03:44
[Optional] Understanding Password Hashing
18:48
Salting and Hashing the Password
08:04
Creating a User
03:22
Handling User Sign In
08:28
Setting up Sessions
06:02
Changing and Fetching Session Data
05:45
Signing in a User
04:47
Getting the Current User
02:01
Signing Out a User
03:46
Two Automation Tools
01:56
Custom Param Decorators
05:34
Why a Decorator and Interceptor
06:12
Communicating from Interceptor to Decorator
07:07
Small Fix for CurrentUserInterceptor
00:05
Connecting an Interceptor to Dependency Injection
04:43
Globally Scoped Interceptors
03:52
Preventing Access with Authentication Guards
06:46

Getting Started with Unit Testing

21 lectures
Testing Overview
04:42
Testing Setup
07:16
Yes, Testing is Confusing
06:49
Getting TypeScript to Help With Mocks
06:23
Quick Note to Help Speed Up Your Tests
00:10
Improving File Layout
04:02
Ensuring Password Gets Hashed
05:56
Refactor 'Email in Use' Test to Address Jest Breaking Changes
00:28
Changing Mock Implementations
07:32
Refactor 'Unused Email' Test to Address Jest Breaking Changes
00:25
Testing the Signin Flow
02:02
Refactor 'Invalid Password' Test to Address Jest Breaking Changes
00:28
Checking Password Comparison
08:37
More Intelligent Mocks
07:56
Refactor 3 Mocks to Address Jest Breaking Changes
00:43
Refactoring to Use Intelligent Mocks
03:24
Unit Testing a Controller
06:48
More Mock Implementations
06:00
Refactor 'User id is not found' Test to Address Jest Breaking Changes
00:26
Not Super Effective Tests
08:10
Testing the Signin Method
06:28

Integration Testing

7 lectures
Getting Started with End to End Testing
03:31
Creating an End to End Test
06:41
App Setup Issues in Spec Files
08:26
Applying a Globally Scoped Pipe
05:02
Applying a Globally Scoped Middleware
04:40
Solving Failures Around Repeat Test Runs
04:46
Creating Separate Test and Dev Databases
04:44

Managing App Configuration

6 lectures
Understanding Dotenv
05:25
Applying Dotenv for Config
06:47
Specifying the Runtime Environment
04:44
Solving a SQLite Error
02:52
It Works!
04:35
A Followup Test
05:22

Relations with TypeORM

14 lectures
Back to Reports
01:00
Adding Properties to Reports
02:52
A DTO for Report Creation
03:49
Receiving Report Creation Requests
07:07
Saving a Report with the Reports Service
04:10
Testing Report Creation
04:07
Building Associations
03:35
Types of Associations
06:39
The ManyToOne and OneToMany Decorators
05:45
Important Note About Deleting Database - Do Not Skip
00:12
More on Decorators
08:28
Setting up the Association
06:38
Formatting the Report Response
03:38
Transforming Properties with a DTO
05:04

A Basic Permissions System

12 lectures
Adding in Report Approval
05:58
Required Update for changeApproval Method
00:18
Testing Report Approval
05:48
Authorization vs Authentication
04:17
Adding an Authorization Guard
04:35
The Guard Doesn't Work?!
02:18
Middlewares, Guards, and Interceptors
03:49
Assigning CurrentUser with a Middleware
08:15
Fixing a Type Definition Error
02:33
Validating Query String Values
07:27
Transforming Query String Data
03:48
How Will We Generate an Estimate
03:31

Query Builders with TypeORM

3 lectures
Creating a Query Builder
05:14
Writing a Query to Produce the Estimate
08:32
Testing the Estimate Logic
03:45

Production Deployment

16 lectures
The Path to Production
02:08
Providing the Cookie Key
03:35
Understanding the Synchronize Flag
03:43
The Dangers of Synchronize
02:22
The Theory Behind Migrations
03:20
Headaches with Config Management
04:48
TypeORM and Nest Config is Great
24:04
Env-Specific Database Config
06:39
Installing the TypeORM CLI
04:38
Generating and Running Migrations
07:07
Required Migration Update for Production
00:34
Running Migrations During E2E Tests
02:49
Production DB Config
04:02
Heroku CLI Setup Instructions
00:11
Heroku Specific Project Config
02:42
Deploying the App - (Final Lecture)
02:51

[Bonus] Appendix: TypeScript

75 lectures
How to Get Help
01:04
TypeScript Overview
06:19
Environment Setup
07:59
Important Axios Version Information
00:12
A First App
04:43
Executing TypeScript Code
05:03
One Quick Change
03:35
Catching Errors with TypeScript
07:22
Catching More Errors!
05:15
Course Overview
03:36
Types
05:12
More on Types
05:53
Examples of Types
04:48
Where Do We Use Types?
00:49
Type Annotations and Inference
02:03
Annotations with Variables
04:53
Object Literal Annotations
06:53
Annotations Around Functions
05:55
Understanding Inference
03:51
The Any Type
07:47
Fixing the "Any" Type
01:49
Delayed Initialization
03:05
When Inference Doesn't Work
04:37
More Annotations Around Functions
04:56
Inference Around Functions
06:08
Annotations for Anonymous Functions
01:42
Void and Never
02:49
Destructuring with Annotations
03:35
Annotations Around Objects
07:05
Arrays in TypeScript
05:05
Why Typed Arrays?
04:30
Multiple Types in Arrays
02:57
When to Use Typed Arrays
00:54
Tuples in TypeScript
04:04
Tuples in Action
05:28
Why Tuples?
03:20
Interfaces
01:26
Long Type Annotations
04:42
Fixing Annotations with Interfaces
04:36
Syntax Around Interfaces
03:31
Functions In Interfaces
04:46
Code Reuse with Interfaces
04:15
General Plan with Interfaces
03:12
Classes
03:47
Basic Inheritance
03:03
Class Method Modifiers
06:41
Fields in Classes
06:18
Fields with Inheritance
04:18
Where to Use Classes
01:09
Updated Parcel Instructions
00:13
App Overview
02:45
Bundling with Parcel
04:54
Project Structure
03:19
IMPORTANT Info About Faker Installation
00:25
Generating Random Data
05:29
Type Definition Files
05:17
Using Type Definition Files
06:20
Export Statements in TypeScript
05:06
Defining a Company
04:43
Important Note About Google Maps Key
00:27
Adding Google Maps Support
07:38
Required Update for New @types Library
00:18
Google Maps Integration with TypeScript
04:06
Exploring Type Definition Files
12:46
Hiding Functionality
06:28
Why Use Private Modifiers? Here's Why
08:25
Adding Markers
09:18
Duplicate Code
02:45
One Possible Solution
06:38
Restricting Access with Interfaces
05:35
Implicit Type Checks
03:26
Showing Popup Windows
06:47
Updating Interface Definitions
07:11
Optional Implements Clauses
06:06
App Wrapup
08:08

Bonus!

1 lectures
Bonus!
00:33

Đá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.