June 2025
Intermediate to advanced
837 pages
24h 50m
English
Another useful tool for managing Node.js applications is the pm2 process manager. You can install this utility via npm using the npm install -g pm2 command. The main features of the process manager are as follows:
Creation of lists of processes controlled by pm2
Process monitoring
Process scaling
Reloading processes without downtime
To start an application with pm2, you can use the start command. For example, if your application is stored in the app.js file, you can start it via the pm2 start app.js -i 1 command. This command line ensures that exactly one instance of this application is booted.
pm2 list allows you to obtain a list of processes that were started with pm2. Table 25.1 contains an example ...
Read now
Unlock full access