...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
...
Note | ||
---|---|---|
| ||
As of July 25th, 2023, there is a content freeze on this page. |
https://www.npmjs.com/package/pm2
https://www.npmjs.com/package/pm2-windows-service
https://blog.cloudboost.io/nodejs-pm2-startup-on-windows-db0906328d75
https://pm2.keymetrics.io/docs/usage/quick-start/
Table of Contents |
---|
Overview
PM2 allows you to process applications in the background. It provides several benefits, for example logs management, automatic restart policies, application monitors to name a few.
...
pm2 start start.js
This will create a default PM2 home folder (under C:\Users\<username>\.pm2
) that will store PM2 relevant files
Change PM2 Home Folder Location
...
Managing apps:
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>
To have more details on a specific application:
pm2 describe <id|app_name>
To monitor logs, custom metrics, application information:
...
Examples:
pm2 logs APP-NAME # Display APP-NAME logs pm2 logs --json # JSON output pm2 logs --format # Formated output pm2 flush # Flush all logs pm2 reloadLogs # Reload all logs
Making Changes to the Configuration File
...