Tutorialspoint

Celebrating 11 Years of Learning Excellence! Use: TP11

NestJs - Build Modern API in NestJs with Unit testing

person icon Ghulam Abbas

4.6

NestJs - Build Modern API in NestJs with Unit testing

Build Modern API with NestJs with MongoDB & Postgres, including Authentication, Typescript, TypeORM, Unit & e2e testing

updated on icon Updated on Jun, 2025

language icon Language - English

person icon Ghulam Abbas

English [CC]

category icon Development ,Web Development,API Development

Lectures -98

Resources -2

Duration -9 hours

Lifetime Access

4.6

price-loader

Lifetime Access

30-days Money-Back Guarantee

Training 5 or more people ?

Get your team access to 10000+ top Tutorials Point courses anytime, anywhere.

Course Description

If you want to build a powerful API in the modern backend framework NestJs or if you want to learn how to unit test API then welcome to this Ultimate NestJs course.

NestJs is a Node.js framework for building efficient, reliable, and scalable Node.js server-side applications. NestJs is a complete framework that will help us to perform everything whether it is authentication or testing a complete API, NestJs provides us with everything that we want. The architecture of NestJs is unmatchable.

Throughout this course, we will use TypeScript which will level up our development. Typescript will help us to write neat and clean code. We will be able to find our errors and bugs right on the spot.

NestJs provides us a lot of flexibility by providing a lot of modules, when it comes to testing, NestJs provides us with a Testing Module that makes Unit testing fun. Connecting to a database whether it is Relational (SQL, POSTGRES, etc) or NoSQL (MongoDB) is just fun and can be done in one line of code.

Really NestJs has made life a lot easier when it comes to building backend applications. The API built with this amazing framework is highly testable, scalable, loosely coupled, and easily maintainable applications.

Below are some points that we will cover in this course:

  • We will discuss what is NestJs and its CLI.

  • Build a complete restaurant API.

  • Use MongoDB to store our data.

  • Add Pagination and Search in our API.

  • Best practices for Error handling & Validations with PIPES.

  • Generate the coordinates of the restaurant address.

  • Uploading multiple images of the restaurant to AWS S3 Bucket.

  • Add Jwt Authentication with Passport.

  • Authorization of Roles with Guards.

  • Build a CRUD Library API with Postgres & TypeORM.

  • Unit Testing of complete API.

  • e2e Testing to API.

  • Deploying API on Heroku.

Interested in learning this amazing NestJs framework for building your next backend API? Then Enroll now and I will see you in the course. Happy Coding!!!

Goals

  • Develop full-featured API with NestJs.

  • Best Practices of Authentication & Authorization.

  • Data Validation & Error Handling using Pipes.

  • How to implement pagination & search.

  • How to generate coordinates of address with GeoCoder.

  • Uploading images on AWS S3 Bucket.

  • How to use a Passport for authentication.

  • How to Protect Routes from unauthorized users.

  • How to build a custom decorator.

  • How to build a custom guard.

  • Using TypeORM for database interaction.

  • Persisting data with databases like MongoDB & Postgres.

  • Understand Database relationships.

  • Writing Unit Tests for complete API.

  • Writing e2e Tests.

  • How to deploy API on Heroku.

Prerequisites

  • Basic knowledge of JavaScript, TypeScript, and NodeJs.

  • Basic knowledge of MongoDB, and Postgres.

  • Knowledge of APIs is a plus, but not required.

NestJs - Build Modern API in NestJs with Unit testing

Curriculum

Check out the detailed breakdown of what’s inside the course

Introduction

4 Lectures
  • play icon Introduction to Course 01:32 01:32
  • play icon DEMO of API 05:46 05:46
  • play icon What is Nest.js & Why we need it 02:50 02:50
  • play icon How to Follow the Course & Code 01:54 01:54

Setting Up Environment

1 Lectures
Tutorialspoint

Setup / Overview of Nest.js

6 Lectures
Tutorialspoint

Let's Start Restaurant API With Nest

8 Lectures
Tutorialspoint

Adding Search & Pagination to API

2 Lectures
Tutorialspoint

Validation, Pipes & Error Handling

4 Lectures
Tutorialspoint

Generating Restaurant Location

3 Lectures
Tutorialspoint

Upload Restaurant Images to AWS S3

5 Lectures
Tutorialspoint

Authentication with Passport JWT

9 Lectures
Tutorialspoint

Protecting Routes with Guards & Custom Decorators

7 Lectures
Tutorialspoint

Adding Meals in Restaurant

7 Lectures
Tutorialspoint

Library API with TypeORM & Postgres

8 Lectures
Tutorialspoint

Database Relations

3 Lectures
Tutorialspoint

Unit Testing Restaurant API - Part 1

16 Lectures
Tutorialspoint

Unit Testing Restaurant API - Part 2

7 Lectures
Tutorialspoint

E2e Testing Restaurant API

5 Lectures
Tutorialspoint

Deployment

2 Lectures
Tutorialspoint

Congratulations

1 Lectures
Tutorialspoint

Instructor Details

Ghulam Abbas

Ghulam Abbas

Hello, I'm Ghulam Abbas. As a programmer, I've always aspired to explore the vast landscape of significant programming languages. JavaScript became my area of interest. My extensive professional journey encompasses both front-end and back-end aspects of web development centred around JavaScript.

I've undertaken a variety of projects using different programming languages. My university education introduced me to JAVA and Python, and I've developed strong proficiency in both languages, completing multiple projects for my clients around the globe. Through my passion for teaching, I've had the privilege of guiding over 75,000+ satisfied students from 191+ countries.

Course Certificate

Use your certificate to make a career change or to advance in your current career.

sample Tutorialspoint certificate

Our students work
with the Best

Feedbacks

S

Steve Nguyen

Amazing course. There are full fundamental nestjs technologies included basic and advanced. Thanks to this course, we can build project, connect database, handle request and authentication.

Related Video Courses

View More

Annual Membership

Become a valued member of Tutorials Point and enjoy unlimited access to our vast library of top-rated Video Courses

Subscribe now
Annual Membership

Online Certifications

Master prominent technologies at full length and become a valued certified professional.

Explore Now
Online Certifications

Talk to us

1800-202-0515