NestJs: Modern ways to build APIs with Typescript and NestJs
Created by Haider Malik, Last Updated 21-Aug-2020, Language:English
NestJs: Modern ways to build APIs with Typescript and NestJs
Step by Step guide to build Restful and GraphQL APIs with Node.Js, Nest.Js, MongoDB, Mysql, Postgres, and Typescript etc
Created by Haider Malik, Last Updated 21-Aug-2020, Language:English
What Will I Get ?
- NestJs Fundamentals
- Typescript Decorators, Generics and Classes
- Build RESTFUL APIs with NestJs and MongoDB
- Build RESTFUL APIs with NestJs and MySQL
- Build RestFUL APIs with NestJs and PostgresQL
- Deploy RESTFUL APIs
- Build GraphQL APIs with NestJs
- Add Documentation for your APIS
- Authentication and Authorization using PassportJs
Requirements
- Having a basic understanding of JavaScript and/or NodeJS
- Having basic knowledge of TypeScript is recommended, but not required
Description
Nest.js is a progressive Node.js framework for building efficient, reliable and scalable server-side applications. NestJS is a server-side (backend) application framework beautifully crafted to support developers productivity and make their lives happier. Well, it's not only a framework, it's an enabler of entering the world of advanced engineering concepts such as Domain Driven Design, Event Sourcing, Microservices architecture.
I spent a good few years in my career developing large scale apps and it didn’t let me down any single time. It’s well written, having quality as an objective, modular web framework with a good documentation, delivering nice developer experience. Exactly the same way I’d describe Nest.
NestJs is built on the top of Typescript and Express.js. It also combines some elements of Object Oriented Programming and functional programming.
Here comes NestJS, a framework which is fully written in TypeScript (it supports JS too, but types are good), it’s easily testable and brings in all the necessary stuff you always think about but you don’t know what to choose.
Why NestJs?
NestJS doesn’t try to limit you to a particular way of doing things, it just provides the tooling you need. It doesn’t try to reinvent the wheel, it utilize existing tools you already know. For example, it uses express behind the scenes which makes your app compatible with the majority of express middlewares.
Here are some good reasons why NestJS shines:
Dependency Injection — NestJS provides DI straight out of the box, increasing efficiency, modularity and testability of applications.
Modularisation — NestJS provides a modular structure for organizing code within the same domain boundary into separate modules.
Flexibility — NestJS provides structure, which helps large teams build complex applications and yet comes in as lightweight as possible, so how you want to build is your choice.
Familiar APIs you already know — NestJS is heavily inspired by Angular, it is also quite similar to much established frameworks like Spring and .NET. This provides a shorter learning curve and lower entry threshold for developers.
Community — NestJS is the fastest rising framework, already with 14K stars surpassing HapiJS. Also, with NestJS leveraging on the Angular way of doing things, things can only get better for the community.
In this course, I will teach you the foundations/fundamentals of NestJs. I will teach you how to build RESTFUL APIs step by step. You will also learn how to plan, design and deploy APIs. I have also another separate section of GraphQL.
Who this course is for:
- Intermediate JavaScript developers who want to dive into back-end development
- Any developer wants to learn how to build backend server side applications with Typescript
- Developers who want to learn how build Restful apis with NestJs, MongoDB and MySQL
- Developers who want to learn how to secure your APIs using JWT
- Developers who want to learn how to deploy NestJs application
- Developers who want to learn how to GraphQL APIs with NestJs
Course Content
-
Getting started with NestJs
5 Lectures 00:21:19-
Introduction to NestJs
Preview00:05:59 -
Routing in NestJs
Preview00:03:25 -
Access Express request Object in NestJs
Preview00:04:35 -
Define Resources
Preview00:03:45 -
Status Code, Redirection and Route Parameters
Preview00:03:35
-
-
CRUD With NestJs
4 Lectures 00:22:42-
Module Introduction
00:02:05 -
Create Post Endpoint to Save Record in Array
00:09:05 -
Request Payload in NestJs
00:06:41 -
FindAll and Delete Endpoint
00:04:51
-
-
Pipes and Validations
3 Lectures 00:14:42-
What are Pipes
00:02:37 -
Add Validations using ValidationPipe
00:06:26 -
Understand How ValidationPipe works
00:05:39
-
-
Middlewares and ExceptionFilters
3 Lectures 00:18:53-
What are Middlewares
00:02:12 -
Creating a Custom Logging Middleware
00:06:27 -
Creating HttpException Filter
00:10:14
-
-
Interceptors
2 Lectures 00:16:39-
What are Interceptors
00:01:44 -
Create Interceptor to Transform the Response
00:14:55
-
-
Connecting NestJs app with TypeORM and Mysql
3 Lectures 00:34:57-
Connect NestJs to Mysql using TypeORM
00:06:59 -
Save new record in MySQL Database Table
00:09:57 -
Get, Update, and Delete Record
00:18:01
-
-
Relations between Entities
4 Lectures 01:37:06-
Adding One to One Relation between Entities
00:08:01 -
CRUD with One to One Relationship
00:29:59 -
Adding One to Many or Many to Many Relation between Entities
00:36:34 -
Adding Many to Many Relation between Entities
00:22:32
-
-
Connected NestJs App to MongoDB using Mongoose
2 Lectures 00:14:40-
Installing MongoDB
-
Connecting NestJs App with MongoDB
00:14:40
-
-
Authentication
5 Lectures 01:01:04-
Introduction to Authentication
00:04:32 -
Implement Signup User
00:14:27 -
Implement Login User
00:14:13 -
Introduction to PassportJs
00:03:56 -
Authenticate User using Passport-JWT Strategy
00:23:56
-
-
Create Documentation for REST APIs using Swagger
2 Lectures 00:20:16-
Configure Swagger with NestJs app
00:11:18 -
Add Documentation for Swagger
00:08:58
-
-
Deployment
1 Lectures 00:13:52-
Deploy NestJs app to MLab and Zeit Now
00:13:52
-
-
Connect NestJs to PostgreSQL and Sequlize
2 Lectures 00:10:04-
Install PostgreSQL
00:02:38 -
Connect NestJs app to Sequelize using Postgres
00:07:26
-
-
Build GraphQL APIs with NestJs
3 Lectures 01:07:12-
GraphQL Setup with NestJs
00:27:01 -
CRUD API with GraphQL and NestJs
00:31:35 -
Resolve Parent Object in Resolvers
00:08:36
-
-
Serialization
1 Lectures 00:11:19-
Transforming and sanitizing the data
00:11:19
-
-
Task Scheduling
1 Lectures 00:05:42-
Task Scheduling
00:05:42
-

Haider Malik
Haider Malik is the founder of fullstackhour. He is a full-stack Javascript developer. He is passionate about everything JavaScript, and he loves exploring new libraries. He’s had extensive experience developing software and working with teams to improve how software is developed to meet business objectives.Although his primary focus is on outcomes, implementation often includes technical competency