O'Reilly logo

TypeScript Microservices by Parth Ghiya

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

PM2

It is the advanced processor manager for Node.js. Node.js, being single threaded, requires some add-on tools for server management such as restarting server, memory management, multiple process management, and so on. It has a built-in load balancer, and it allows you to keep the application running forever. It has zero downtime and other system admin options that has eased up life. It is also exposed as a module, so we can runtime trigger various options at any phase of Node.js applications. To install PM2, open up a Terminal and shoot the following command:

npm install pm2 -g

More detailed options and APIs can be found at http://pm2.keymetrics.io/docs/usage/pm2-api/.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required