Recall & Review
beginner
What is PM2 in the context of Node.js applications?
PM2 is a process manager for Node.js applications that helps keep apps running continuously, restarts them if they crash, and manages multiple processes easily.
Click to reveal answer
beginner
How do you start an Express app using PM2?
You use the command
pm2 start app.js where app.js is your Express app's main file. PM2 will run and monitor the app.Click to reveal answer
beginner
What command shows the list of running processes managed by PM2?
The command
pm2 list displays all running processes with their status, CPU, and memory usage.Click to reveal answer
intermediate
How does PM2 help with zero-downtime reloads in production?
PM2 can reload your app without stopping it completely using
pm2 reload app_name, which restarts processes one by one to avoid downtime.Click to reveal answer
intermediate
What is the purpose of the
ecosystem.config.js file in PM2?It is a configuration file where you define how PM2 should run your app(s), including environment variables, number of instances, and script paths.
Click to reveal answer
Which PM2 command starts your Express app?
✗ Incorrect
The correct command to start an app with PM2 is
pm2 start app.js.What does
pm2 list show?✗ Incorrect
pm2 list shows all processes PM2 is managing, including their status.How can PM2 help avoid downtime when updating your app?
✗ Incorrect
PM2 reloads processes one at a time to keep the app available during updates.
What is the role of
ecosystem.config.js in PM2?✗ Incorrect
ecosystem.config.js configures how PM2 runs your app, including environment variables and instances.Which of these is NOT a feature of PM2?
✗ Incorrect
PM2 manages processes but does not compile JavaScript to machine code.
Explain how PM2 helps keep an Express app running smoothly in production.
Think about what happens if your app crashes or needs updating.
You got /4 concepts.
Describe the purpose and typical contents of the PM2 ecosystem.config.js file.
It's a setup file that tells PM2 how to run your app.
You got /4 concepts.