We always use our CLI to run and debug our Node.js program, Application will run as long as our program executed on CLI. If we have error occurred on Node.js program on run-time, it will stop the entire application. So, We need a process management tool to run our Node.js application as process run on background and to start automatically if any errors occurs.
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.