PM2
ELI5 — The Vibe Check
PM2 is the most popular process manager for Node.js. It keeps your app alive, restarts it when it crashes, and can run multiple copies across all your CPU cores. It's the 'set it and forget it' of Node.js deployment. Also has a nice dashboard.
Real Talk
PM2 is a production-grade process manager for Node.js applications with a built-in load balancer. It provides zero-downtime reloads, log management, startup scripts, cluster mode for multi-core utilization, and a monitoring dashboard. It can also manage non-Node processes like Python scripts.
Show Me The Code
# Start with cluster mode (all CPU cores)
pm2 start app.js -i max
# Monitor processes
pm2 monit
# Zero-downtime reload
pm2 reload app
When You'll Hear This
"PM2 cluster mode spreads our app across 8 CPU cores automatically." / "Set up PM2 startup so the app survives server reboots."
Related Terms
Cluster
A Kubernetes Cluster is the whole system — all the nodes (machines) working together as one, managed by a control plane.
Deployment
A deployment is the event of pushing your code live — it's both the action and the thing you deployed.
Node.js
Node.js lets you run JavaScript on the server — not just in the browser. Before Node.js, JavaScript was trapped in the browser.
Process Manager
A process manager is the project coordinator for long-running workflows.