DEV Community

Cover image for Pm2 Node Process Manager
Abayomi Ogunnusi
Abayomi Ogunnusi

Posted on • Edited on

Pm2 Node Process Manager

Good day, developers!

Today, we'll look at the node process manager, its visually appealing interface, and its basic syntax.

pm2 is a production process manager for Node.js applications with a built-in load balancer. It allows you to **keep applications alive forever, to reload them without downtime and to facilitate common system admin tasks. resources.

I love the keep applications alive forever part because
imag

Because of its visual depiction, I might prefer this to Nodemon.
Let me know what you think in the comments area. Now that we've gotten that out of the way, let's get down to business.

I'll be utilizing a node qr project that Olubisi Idris authored. link here.


Setup

๐ŸŒณ Install the pm2 package
npm i -g pm2

๐ŸŒณ To start your node server run this command.

pm2 start [entry file]. In my case pm2 start app.js

Image description

๐ŸŒณ A quick check to know if our server is running

Run: pm2 logs
Image description

๐ŸŒณ Stop the pm2
pm2 stop <app_name|namespace|id|'all'|json_conf>

This means you can use either the app name, id or all

pm2 stop 0

Image description

๐ŸŒณ To restart
pm2 restart 0

Image description

๐ŸŒณ To see full description of application
pm2 describe 0

Image description

Discuss.

Why will you choose this over other node application starters.

Resources

Top comments (0)