NestJs - Build Modern APIs in NestJs with Unit Testing

9h 19m 27s
English
Paid

Course description

If you want to create a powerful API using the modern backend framework NestJS or learn API unit testing, welcome to the Ultimate NestJS course!

NestJS is a framework for Node.js designed to create efficient, reliable, and scalable server-side applications. It is a comprehensive framework that supports everything from authentication to complex API testing, providing developers with all the necessary tools. The architecture of NestJS is what sets it apart from other frameworks.

In this course, we will use TypeScript to enhance the development process. TypeScript helps us write clean and neat code, as well as instantly find errors and bugs.

NestJS offers extensive capabilities through a multitude of modules. For testing, NestJS has a special module that makes unit testing simple and enjoyable. Connecting to a database, whether relational (SQL, PostgreSQL, etc.) or NoSQL (MongoDB), can be accomplished with just a single line of code.

NestJS significantly simplifies the creation of server-side applications. APIs built using this framework are easily testable, scalable, have loose coupling, and are easy to maintain.

Watch Online

This is a demo lesson (10:00 remaining)

You can watch up to 10 minutes for free. Subscribe to unlock all 100 lessons in this course and access 10,000+ hours of premium content across all courses.

View Pricing

Watch Online NestJs - Build Modern APIs in NestJs with Unit Testing

0:00
/
#1: Introduction to the Course

All Course Lessons (100)

#Lesson TitleDurationAccess
1
Introduction to the Course Demo
01:33
2
DEMO of API
05:47
3
What is Nest.js & Why we need it?
02:51
4
How to Follow the Course & Code?
01:55
5
Installing all required tools
02:54
6
Install MongoDB on MacOS
02:00
7
Install MongoDB on Windows
04:26
8
Installing Nest CLI & Creating app
03:15
9
Understanding the folder structure
03:07
10
Nest.js Modules
04:45
11
Nest.js Controllers
03:43
12
Nest.js Service & Providers
05:33
13
Connecting to MongoDB with mongoose
10:08
14
Creating Restaurant Schema
08:23
15
Get all Restaurants
11:10
16
Create a new Restaurant
06:23
17
What is DTO?
02:24
18
Creating a Restaurant DTO
02:33
19
Get Restaurant by ID
06:53
20
Update Restaurant by ID
08:10
21
Delete Restaurant
04:48
22
Adding Search
06:55
23
Adding Pagination
05:10
24
What are Pipes?
03:30
25
Using Validation Pipe Globally
10:37
26
Adding Validation Rules in Update DTO
03:35
27
Invalid Mongoose ID Error
03:00
28
What is GeoCoder
03:04
29
Generating Coordinates & Address
10:24
30
Saving Location in Restaurants
05:48
31
Create Bucket on S3
07:54
32
Getting files through File Intercepter
06:51
33
Uploading images to S3
11:56
34
Saving Images in Restaurant
03:16
35
Delete Restaurant Images
09:51
36
Generating Auth Module
02:55
37
Creating User Schema
05:54
38
Sign up DTO with Validators
02:24
39
User Sign up
06:41
40
Hash user password while Sign up
03:32
41
Handle Duplicate Email Error
02:46
42
Login User
07:36
43
Setting Up JWT & Passport
06:04
44
Sign JWT token on Login
05:49
45
Setting Up JWT Strategy
08:23
46
Using AuthGuard to Protect Routes
04:44
47
Current User Decorator
04:55
48
Saving Current User in Restaurant
05:53
49
Creating User Roles Guard
08:19
50
Roles Decorator
03:50
51
Authorize Restaurant Ownership
05:16
52
Creating Meal Model
05:54
53
Create Meal DTO
06:11
54
Creating a Meal
14:49
55
Getting all Meals
05:25
56
Get Meal by ID
03:52
57
Update Meal
06:58
58
Delete Meal
05:55
59
Create Library Project
04:26
60
Install & Setup Postgres & pgAdmin
03:37
61
Connecting to Postgres Database
04:09
62
Create Book Entity
03:14
63
Create new Book
08:12
64
Get all Books & Book by ID
03:59
65
Update Book
04:10
66
Delete Book
02:25
67
Relations & Types of relations
02:42
68
Create User Entity
05:34
69
Adding Books & User Relation (OneToMany & ManyToOne)
06:49
70
What is Unit Testing?
02:48
71
Write first unit test in Restaurant Service
08:40
72
Testing RestaurantsService - findAll
10:23
73
Testing RestaurantsService - create
09:49
74
Testing RestaurantsService - findById
08:44
75
Testing RestaurantsService - updateById
04:47
76
Testing RestaurantsService - deleteById
02:34
77
Testing RestaurantsService - uploadImages
05:50
78
Testing RestaurantsService - deleteImages
02:47
79
First unit test in Restaurant Controller
06:51
80
Testing RestaurantController - getAllRestaurants
03:43
81
Testing RestaurantController - createRestaurant
03:42
82
Testing RestaurantController - getRestaurantById
03:06
83
Testing RestaurantController - updateRestaurant
09:15
84
Testing RestaurantController - deleteRestaurant
07:24
85
Testing RestaurantController - uploadFiles
03:53
86
Testing Auth Service
05:54
87
Testing AuthService - signUp
09:27
88
Testing AuthService - login
08:49
89
Testing Auth Controller
04:09
90
Testing AuthController - signUp
03:05
91
Testing AuthController - login
02:21
92
Testing JwtStrategy
11:28
93
What is e2e Testing
04:20
94
Testing Authentication Routes
10:48
95
Testing Restaurants POST protected Routes
06:08
96
Testing Restaurants GET Routes
04:10
97
Testing Restaurants PUT & DELETE Routes
02:28
98
Preparing API for Deploy
07:27
99
Deploy API on Heroku
05:57
100
Congratulations!!!
00:46

Unlock unlimited learning

Get instant access to all 99 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.

Learn more about subscription

Comments

0 comments

Want to join the conversation?

Sign in to comment

Similar courses

NestJS - Building Real Project API From Scratch

NestJS - Building Real Project API From Scratch

Sources: udemy, MonsterLessons
In this course we will build a Medium clone API using NestJS, Typescript, Typeorm and PostgreSQL. This course is fully focused on fast and deep dive into creati
7 hours 59 minutes 44 seconds
NestJS Microservices: Breaking a Monolith to Microservices

NestJS Microservices: Breaking a Monolith to Microservices

Sources: udemy
This course will start with a pre-built monolith, the building of the starting app won't be covered in this course. So in this course, you will start immediately with Microservi...
8 hours 6 minutes 46 seconds
Master NestJS by Building Real-World Projects

Master NestJS by Building Real-World Projects

Sources: Tom Ray
The course is a practical guide to mastering the NestJS framework for developing scalable and efficient server-side applications.
18 hours 20 minutes 35 seconds
React and NestJS: A Practical Guide with Docker

React and NestJS: A Practical Guide with Docker

Sources: udemy
I'm a FullStack Developer with 10+ years of experience. I'm obsessed with clean code and I try my best that my courses have the cleanest code possible. My teaching style is very...
6 hours 54 minutes 20 seconds
NestJS. Architecture and Advanced Patterns

NestJS. Architecture and Advanced Patterns

Sources: learn.nestjs.com
In one of our most advanced courses yet. In this course, we will be covering many powerful Architectural Concepts & Patterns used in some of today's most complex Node.js systems...
2 hours 15 minutes 52 seconds