This document might be outdated relative to the documentation in English. For the latest updates, please refer to the documentation in English.

✖

Process managers for Express apps

When running Express apps for production, it is helpful to use a process manager to:

Restart the app automatically if it crashes.

Gain insights into runtime performance and resource consumption.

Modify settings dynamically to improve performance.

Control clustering.

A process manager is somewhat like an application server: it’s a “container” for applications that facilitates deployment,
provides high availability, and enables you to manage the application at runtime.

The most popular process managers for Express and other Node applications are:

Using any of these three tools can be very helpful, however StrongLoop Process Manager is the only solution that provides a comprehensive runtime and deployment solution that address entire Node application life cycle with tooling for every step before and after production in an unified interface.

StrongLoop Process Manager (StrongLoop PM) is a production process manager for Node.js applications with built-in load balancing, monitoring, multi-host deployment, and a graphical console.
It enables you to:

Build, package, and deploy your Node application to a local or remote system.

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 will facilitate common system admin tasks. It also enables you to manage application logging, monitoring, and clustering.

Starting an app with pm2 will immediately send it to the background. You can control the background app from the command line using various pm2 commands.

Once an app is started with pm2 it is registered in pm2’s list of processes with an ID, which makes it possible to manage apps with the same name from different directories on the system, using their IDs.

Note that if more than one app with the same name is running, pm2 commands affect all of them. So use IDs instead of names to manage individual apps.