Develop RESTful Web Services using NestJS and MongoDB by Vinod Kayartaya

Develop RESTful Web Services using NestJS and MongoDB

42 lectures - 5hrs

What's included?

Video Icon 42 videos

Contents

Introduction
Course intro
2 mins
Introduction to RESTful services
3 mins
Introduction to Nest JS
3 mins
Software setup
7 mins
Creating our first Nest JS Application
16 mins
Controllers in detail
Handling HTTP GET requests
13 mins
Handling HTTP POST requests
10 mins
Handling HTTP PUT requests
8 mins
Partial update using HTTP PATCH request
4 mins
Handling HTTP DELETE requests
5 mins
Providers in Nest JS
Overview of providers
5 mins
Creating the ContactService injectable
17 mins
POST /contacts controller and service
11 mins
GET /contacts controller and service
2 mins
GET /contacts/:id controller and service
4 mins
ASSIGNMENT- Implement PUT, PATCH and DELETE handlers
2 mins
ASSIGNMENT SOLUTION
11 mins
Middleware
Overview of Nest middlewares
2 mins
Class as middleware
13 mins
Function based and third party middlewares
10 mins
Dealing with exceptions
Standard exceptions
7 mins
Custom exceptions
7 mins
Exception filters
11 mins
Pipes in Nest JS
Overview of pipes and using built-in pipes
15 mins
Creating and using custom pipes
19 mins
Using ValidationPipe and class-validator library
8 mins
Using Mongodb
A quick intro to Mongodb
3 mins
Downloading and setting up Mongodb server on our local machine
7 mins
Getting familiar with basic Mongodb shell commands
8 mins
Creating a new Nest project with required dependencies
3 mins
Creating contacts module, controller and service
4 mins
Contact model and schema
6 mins
Adding a new contact via POST request
12 mins
Get all contacts via GET request with pagination
11 mins
Fetch a contact by id via GET request
7 mins
Update a document via PUT request
8 mins
Delete a document via DELETE request
5 mins
Partial update of a document via PATCH request
6 mins
Connecting our app to Mongodb Atlas (Cloud)
8 mins
Deploy to a cloud server (Heroku)
Creating an account with Heroku
2 mins
Installing Heroku CLI
3 mins
Deploying our application to Heroku
9 mins

Requirements

  • A basic understanding of JavaScript on NodeJS
  • Basic knowledge of TypeScript is recommended, but not required

What will you learn in this course?

  • Design and develop RESTful web services
  • Using Nest CLI efficiently
  • Create CRUD. operations
  • Modules, controllers and injectables
  • Filters and Pipes
  • Validation
  • DTO or Data Transfer Objects
  • Asynchronous operations using async/await
  • Persisting data in MongoDB collections
  • Industry standard best practices
  • Connecting to MongoDB cloud based server
  • Deploying our application to Heroku server

Who this course for?

  • Angular developers who want to apply their Angular/Typescript skills on the back end to create RESTful web services
  • Intermediate JavaScript developers who want to dive into back-end development
  • Any developers willing to apply TypeScript on the back-end
  • Developers eager to learn how to develop performant, secure and production-ready REST APIs following best practices
  • Developers who want to learn how to deploy their application to the cloud (Amazon Web Services)
  • Developers who want to follow building a practical, real-world application from zero to production

Description

Nest (NestJS) is a framework for building efficient, scalable Node.js server-side applications. It uses progressive JavaScript, is built with and fully supports TypeScript (yet still enables developers to code in pure JavaScript) and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming).

Under the hood, Nest makes use of robust HTTP Server frameworks like Express (the default) and optionally can be configured to use Fastify as well!

Nest provides a level of abstraction above these common Node.js frameworks (Express/Fastify), but also exposes their APIs directly to the developer. This allows developers the freedom to use the myriad of third-party modules which are available for the underlying platform.

In recent years, thanks to Node.js, JavaScript has become the “lingua franca” of the web for both front and backend applications. This has given rise to awesome projects like Angular, React and Vue, which improve developer productivity and enable the creation of fast, testable, and extensible frontend applications. However, while plenty of superb libraries, helpers, and tools exist for Node (and server-side JavaScript), none of them effectively solve the main problem of - Architecture.

Nest provides an out-of-the-box application architecture which allows developers and teams to create highly testable, scalable, loosely coupled, and easily maintainable applications. The architecture is heavily inspired by Angular.

In this course I am going to guide you through the process of planning, developing and deploying a fully-featured RESTful web service using TypeScript+NestJS on Node platform.

Hi. My name is Vinod

Hi, my name is Vinod, and I am a software trainer, consultant and freelance developer. I am the creator some of the highest rated courses on Udemy. In my professional career, I have trained hundreds of thousands of software engineers. Teaching is not only my profession, but also a passion. Creating online courses gives me the opportunity to reach and help students across the world.