-h, --help |
output usage information |
-V, --version |
output the version number |
-v --version |
get version |
-s --silent |
hide all messages |
-m --mini-list |
display a compacted list without formatting |
-f --force |
force actions |
-n --name <name> |
set a for script |
-i --instances <number> |
launch [number] instances (for networked app)(load balanced) |
-l --log [path] |
specify entire log file (error and out are both included) |
-o --output <path> |
specify out log file |
-e --error <path> |
specify error log file |
-p --pid <pid> |
specify pid file |
--max-memory-restart <memory> |
specify max memory amount used to autorestart (in megaoctets) |
--env <environment_name> |
specify environment to get specific env variables (for JSON declaration) |
-x --execute-command |
execute a program using fork system |
-u --user <username> |
define user when generating startup script |
-c --cron <cron_pattern> |
restart a running process based on a cron pattern |
-w --write |
write configuration in local folder |
--interpreter <interpreter> |
the interpreter pm2 should use for executing app (bash, python…) |
--log-date-format <momentjs format> |
add custom prefix timestamp to logs |
--no-daemon |
run pm2 daemon in the foreground if it doesn’t exist already |
--merge-logs |
merge logs from different instances but keep error and out separated |
--watch |
watch application folder for changes |
--ignore-watch <folders|files> |
folder/files to be ignored watching, chould be a specific name or regex - e.g. –ignore-watch=”test node_modules “some scripts”” |
--node-args <node_args> |
space delimited arguments to pass to node in cluster mode - e.g. –node-args=”–debug=7001 –trace-deprecation” |
--no-color |
skip colors |
--no-vizion |
skip vizion features (versioning control) |
--no-autorestart |
do not automatically restart apps |