Nestjs Zero To Hero

Tags: Node.Js

Develop and deploy enterprise back-end applications following best practices using Node.js and TypeScript

Last updated 2022-01-10 | 4.7

- Becoming familiar with the NestJS framework and its components
- Designing and developing REST APIs performing CRUD operations
- Authentication and Authorization for back-end applications

What you'll learn

Becoming familiar with the NestJS framework and its components
Designing and developing REST APIs performing CRUD operations
Authentication and Authorization for back-end applications
Using TypeORM for database interaction
Security best practices
password hashing and storing sensitive information
Persisting data using a database
Deploying back-end applications at a production-ready state to Amazon Web Services
Writing clean
maintainable code in-line with industry standards
Utilising the NestJS Command Line Interface (CLI)
Using Postman for testing back-end services
Using pgAdmin as an interface tool to manage PostgreSQL databases
Implement efficient logging in a back-end application
Environment-based configuration management and environment variables
Implementing data validation and using Pipes
Guarding endpoints for authorized users using Guards
Modelling entities for the persistence layer
TypeScript best practices
Handling asynchronous operations using async-await
Using Data Transfer Objects (DTO)
Hands-on experience with JSON Web Tokens (JWT)
Unit testing NestJS applications
Using GraphQL with NestJS
Database persistence with MongoDB

* Requirements

* Having a basic understanding of JavaScript and/or NodeJS
* Having basic knowledge of TypeScript is recommended
* but not required

Description

  • Becoming familiar with the NestJS framework and its components
  • Designing and developing REST APIs performing CRUD operations
  • Authentication and Authorization for back-end applications
  • Using TypeORM for database interaction
  • Security best practices, password hashing and storing sensitive information
  • Persisting data using a database
  • Deploying back-end applications at a production-ready state to Amazon Web Services
  • Writing clean, maintainable code in-line with industry standards
  • Utilising the NestJS Command Line Interface (CLI)
  • Using Postman for testing back-end services
  • Using pgAdmin as an interface tool to manage PostgreSQL databases
  • Implement efficient logging in a back-end application
  • Environment-based configuration management and environment variables
  • Implementing data validation and using Pipes
  • Guarding endpoints for authorized users using Guards
  • Modelling entities for the persistence layer
  • TypeScript best practices
  • Handling asynchronous operations using async-await
  • Using Data Transfer Objects (DTO)
  • Hands-on experience with JSON Web Tokens (JWT)
  • Unit testing NestJS applications
  • Using GraphQL with NestJS
  • Database persistence with MongoDB

Course content

13 sections • 137 lectures

NEW COURSE VERSION LIVE (JUNE 2021) Preview 00:29

Welcome to the course! Preview 01:11

Installing Node.js and Yarn Preview 00:16

Installing the NestJS CLI Preview 00:56

(Optional) Installing VSCode and Extensions Preview 02:55

Project Overview Preview 05:17

Creating our project via the NestJS CLI Preview 02:04

NestJS Project Structure Preview 06:36

Introduction to NestJS Modules Preview 02:53

Creating a Tasks Module Preview 03:32

Introduction to NestJS Controllers Preview 03:46

Creating at Tasks Controller Preview 03:37

Introduction to NestJS Providers and Services Preview 05:02

Creating a Tasks Service Preview 05:54

Feature: Getting All Tasks Preview 07:30

Installing Postman Preview 00:12

Creating a Postman Collection Preview 01:43

Defining a Task Model Preview 05:01

Feature: Creating a Task (Part 1 - Controller) Preview 04:59

Feature: Creating a Task (Part 2 - Service) Preview 06:36

Intro to Data Transfer Objects (DTO) Preview 05:36

Implementing CreateTaskDto Preview 04:58

Feature: Getting a Task by ID Preview 05:43

Challenge: Deleting a Task Preview 00:52

Solution: Deleting a Task Preview 04:23

Challenge: Update Task Status Preview 01:19

Solution: Update Task Status Preview 05:27

Feature: Searching and Filtering Preview 08:49

Summary Quiz

Section Code Preview 00:00

Introduction to NestJS Pipes Preview 04:14

ValidationPipe: Creating a Task Preview 04:31

Error Handling: Getting a non-existing Task Preview 04:16

Error Handling: Deleting a non-existing Task Preview 01:09

Validation: Update Task Status Preview 03:27

Challenge: Validating Task Filtering and Search Preview 02:42

Section Code Preview 00:00

Introduction to Persistence Preview 00:29

Installing Docker and pgAdmin Preview 00:21

Running PostgreSQL via Docker Preview 04:02

Setting up pgAdmin Preview 01:45

Creating a Database using pgAdmin Preview 00:54

Introduction to TypeORM Preview 02:57

Setting up a Database Connection Preview 04:29

Creating a Task Entity Preview 03:51

Active Record VS Data Mapper Patterns Preview 03:40

Creating a Tasks Repository Preview 03:33

Refactoring for Tasks Service Preview 03:44

Persistence: Getting a Task by ID Preview 08:33

Persistence: Creating a Task Preview 07:31

(Challenge) Persistence: Deleting a Task Preview 01:22

(Solution) Persistence: Deleting a Task Preview 04:58

Persistence: Update Task Status Preview 02:40

Small Change Needed Preview 01:40

Persistence: Getting All Tasks Preview 12:22

Section Code Preview 00:00

Intro to Authentication and Authorization Preview 01:11

Setting up AuthModule, User Entity and User Repository Preview 05:05

Feature: Signing Up Preview 08:26

Validation: Credentials and Password Strength Preview 04:12

Error Handling: Username Conflicts Preview 06:42

Securely Storing Passwords Preview 07:22

Password Hashing With Bcrypt Preview 04:25

Feature: Signing In Preview 04:42

Intro to JSON Web Tokens (JWT) Preview 05:54

Setting up the JWT Module and Passport.js Preview 03:34

Signing a JWT Token on Sign In (Authentication) Preview 07:08

Implementing JWT Validation Preview 11:38

Custom @GetUser Decorator Preview 03:14

Guarding the Tasks Routes Preview 02:00

Section Code Preview 00:00

Tasks and Users - Database Relation Preview 03:58

Make Users Own Tasks Preview 04:36

Serialize User Data Preview 03:39

Restricting Getting All Tasks Preview 03:30

BUG FIX: Getting All Tasks Preview 02:34

Restricting Getting a Task By ID Preview 03:50

Restricting Status Updates Preview 00:50

Restricting Deleting A Task Preview 01:23

Section Code Preview 00:00

Introduction to Logging Preview 02:53

Implementing Logs in our NestJS app Preview 14:54

Section Code Preview 00:00

Introduction to Configuration Preview 02:10

Windows: Environment Variables Preview 00:34

Quick Intro to Environment Variables Preview 03:50

Setting up ConfigModule Preview 09:18

TypeORM Configuration Preview 09:37

Config Schema Validation Preview 06:38

JWT Secret Configuration Preview 04:07

Section Code Preview 00:00

DISCLAIMER: Potential Costs Preview 00:18

Signing up to Heroku Preview 01:06

Creating a Heroku Application Preview 00:58

Installing the the Heroku CLI Preview 01:11

Postgres on Heroku Preview 02:59

Changes in our NestJS App Preview 05:11

Deploying NestJS to Heroku Preview 09:48

Deploying Front-end to GitHub Pages Preview 08:20

Section Code Preview 00:00

Unit Testing Crash Course: Basics Preview 01:46

Unit Testing Crash Course: First Tests Preview 06:38

IMPORTANT: Fixing import paths Preview 01:36

Testing TasksService - Part 1 Preview 18:43

Testing TasksService - Part 2 Preview 07:29

Section Code Preview 00:00

GraphQL + MongoDB: Section Introduction Preview 01:05

Project Overview: School Management Preview 02:38

MongoDB Installation Preview 00:13

Robo 3T - Connecting to the MongoDB Database Preview 01:14

Project setup Preview 02:04

Ensure NestJS 7 Installation Preview 00:54

Installing GraphQL Dependencies Preview 03:02

IMPORTANT! GraphQL installation version Preview 00:17

Creating the Lesson Module Preview 01:26

Defining the Lesson GraphQL Type Preview 03:13

Creating the Lesson Resolver Preview 04:03

Using the GraphQL Playground Preview 03:44

Persistence: TypeORM, MongoDB and our Lesson Entity Preview 06:33

LessonService and createLesson method Preview 08:05

Create Lesson GraphQL Mutation Preview 05:01

getLesson GraphQL Query with MongoDB Preview 03:40

Validation: Create Lesson Input Preview 07:15

Challenge: Get All Lessons GraphQL Query Preview 04:07

Creating the Student Module Preview 01:44

Challenge: Defining the Student Entity Preview 02:53

Challenge: Create Student Mutation Preview 10:28

Challenge: Get All Students GraphQL Query Preview 02:37

Challenge: Get Student by ID Query Preview 02:44

Assign Students To Lesson GraphQL Mutation Preview 10:26

Improvement: Assign Students Upon Lesson Creation Preview 03:14

Resolve "students" Field in Lesson Preview 08:13

Additional Resources: GraphQL Preview 00:02

Section Code Preview 00:00