From the course: Advanced Node.js: Scaling Applications
Unlock the full course today
Join today to access over 24,500 courses taught by industry experts.
Decomposing services - Node.js Tutorial
From the course: Advanced Node.js: Scaling Applications
Decomposing services
- [Instructor] Let's take a look at how we can take a large API built with Express and break it down into smaller services that each focus on specific features. I'm in the terminal in the exercise files under chapter three, chapter three lesson two, and this is the start folder, within this folder, we're gonna find a file called the ticket-system.js. Inside of this file is the world's smallest monolith. It's an Express API that handles reservations and reserving seats for shows with two different data points. So I'm gonna go into the start folder and run an npm install just to install Express and the other dependencies needed for the ticket system. And then we'll go ahead and start it with pm2. So I'll do a pm2 start ticket-system.js -i 3. So we'll run it on a little three-instant cluster. And then I'm gonna go ahead and make a request for the ticket system using curl. So we'll do curl http://localhost:3000 and we will…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.