pm2
's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.Name | Version | Size | License | Type | Vulnerabilities |
---|---|---|---|---|---|
@pm2/agent | 2.0.3 | 43.4 kB | AGPL-3.0 | prod | 1 1 1 |
@pm2/io | 5.0.2 | 139.93 kB | Apache-2 | prod | 2 1 |
@pm2/js-api | 0.6.7 | 160.86 kB | Apache-2 | prod | 1 1 1 |
@pm2/pm2-version-check | 1.0.4 | 979 B | MIT | prod | 1 |
async | 3.2.5 | 146.47 kB | MIT | prod optional | |
blessed | 0.1.81 | 255.48 kB | MIT | prod | |
chalk | 3.0.0 | 10.67 kB | MIT | prod | |
chokidar | 3.6.0 | 25.83 kB | MIT | prod | |
cli-tableau | 2.0.1 | 6.22 kB | UNKNOWN | prod | 1 |
commander | 2.15.1 | 17.46 kB | MIT | prod | |
croner | 4.1.97 | 44.32 kB | MIT | prod | |
dayjs | 1.11.11 | 650.17 kB | MIT | prod | |
debug | 4.3.4 | 12.94 kB | MIT | prod optional | |
enquirer | 2.3.6 | 46.72 kB | MIT | prod | |
eventemitter2 | 5.0.1 | 9.91 kB | MIT | prod | |
fclone | 1.0.11 | 4.53 kB | MIT | prod | |
mkdirp | 1.0.4 | 6.51 kB | MIT | prod | |
needle | 2.4.0 | 41.98 kB | MIT | prod | |
pidusage | 3.0.2 | 9.49 kB | MIT | prod | |
pm2-axon-rpc | 0.7.1 | 3.58 kB | MIT | prod | |
pm2-axon | 4.0.1 | 12.7 kB | MIT | prod | |
pm2-deploy | 1.0.2 | 6.06 kB | MIT | prod | 1 |
pm2-multimeter | 0.1.2 | 3.87 kB | MIT/X11 | prod | 2 2 |
pm2-sysmonit | 1.2.8 | 32.76 kB | Apache | prod optional | 1 2 1 |
promptly | 2.2.0 | 5.66 kB | MIT | prod | |
semver | 7.6.0 | 26.57 kB | ISC | prod | |
source-map-support | 0.5.21 | 26.03 kB | MIT | prod | |
sprintf-js | 1.1.2 | 11.01 kB | BSD-3-Clause | prod | |
vizion | 2.2.1 | 12.38 kB | Apache-2.0 | prod | |
yamljs | 0.3.0 | 150.28 kB | MIT | prod |
PM2 is a critical production process manager for Node.js applications, complete with a built-in load balancer. It's designed to affordably keep applications alive indefinitely, reload them with no downtime, and simplify routine system admin tasks. It operates on Linux, macOS, and Windows, supporting all Node.js versions starting from Node.js 12.X.
To utilize PM2, start by installing it via NPM with the command:
$ npm install pm2 -g
Kickstart an application by using the "pm2 start" command followed by the application name. For instance:
$ pm2 start app.js
This then daemonizes your application, where it's monitored and consistently kept alive.
For managing your applications, PM2 provides a variety of commands. To list all current running applications, use:
$ pm2 list
For starting, stopping, restarting, or deleting an application, you can use "pm2 stop", "pm2 restart", or "pm2 delete" respectively, followed by the application name, namespace, id, 'all', or json config:
$ pm2 stop <app_name|namespace|id|'all'|json_conf>
$ pm2 restart <app_name|namespace|id|'all'|json_conf>
$ pm2 delete <app_name|namespace|id|'all'|json_conf>
For in-depth information on a particular application:
$ pm2 describe <id|app_name>
To monitor logs, custom metrics, and application information, you install the following module:
$ pm2 install pm2-logrotate
And then type the command:
$ pm2 logs
To enable log rotation or execute a hot reload, you simply input "pm2 reload all".
For complete PM2 documentation, you can visit the official website https://pm2.keymetrics.io/, which is also the destination for more information about Process Management, Cluster Mode, Container Support, Monitoring, Log Management, Startup Scripts Generation, and PM2+ Monitoring. Keep your Node.js applications smoothly running with the versatile, easy-to-use PM2.