Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

freeCodeCamp

Building Microservices with Nest.js - JavaScript Tutorial

via freeCodeCamp

Overview

Coursera Plus Monthly Sale: All Certificates & Courses 40% Off!
This JavaScript tutorial guides you through building microservices with Nest.js by creating a practical delivery service application that tracks rider coordinates. Learn to develop two interconnected microservices—Login Service and Rider Service—while mastering MongoDB integration with Docker containers. Follow along as you set up a Nest.js microservices project, implement MongoDB with Mongoose, validate request bodies, save and retrieve coordinates from the database, and establish TCP-based communication between microservices. The tutorial covers essential concepts including Docker implementation, schema definition, event-based microservice communication, and troubleshooting common issues. Access the complete source code on GitHub and deepen your understanding of building scalable, maintainable microservice architectures in Nest.js.

Syllabus

0:00:00 Intro
0:00:32 Sample-Application
0:02:20 Setup Nest.js Microservices Project
0:11:22 Install MongoDB Update
0:14:18 Why Docker
0:18:34 Run MongoDB in Docker Container
0:24:34 Run MongoDB using Docker Compose
0:29:05 Install Nestjs Mongoose Package
0:34:35 MongoDB Port Forwarding
0:39:20 Setup Module
0:49:41 Define Schema
0:56:16 Validating Request Body
1:07:31 Save Coordinates
1:18:31 Get Data from DB
1:24:22 TCP Based Microservices Communication
1:26:10 Mock Rider By ID method
1:29:04 Define Event to communicate between microservices
1:36:59 Define ID Param
1:42:23 Testing-and-Fixing Bug

Taught by

freeCodeCamp.org

Reviews

Start your review of Building Microservices with Nest.js - JavaScript Tutorial

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.