pm2 command

Creator
Creator
Seonglae ChoSeonglae Cho
Created
Created
2020 May 25 3:40
Editor
Edited
Edited
2023 Oct 28 15:12
Refs
Refs
pm2 commands
 

Normal

{ "apps": [ { "name": "name", "script": "./node_modules/nuxt/bin/nuxt.js", "merge_logs": true, "log_date_format": "YYYY-MM-DD HH:mm", "max_memory_restart": "4000M", "env": { "HOST": "0.0.0.0", "PORT": 3000, "NODE_ENV": "production" } } ] }
 

Cluster

{ "apps": [ { "name": "blabla", "instances": "max", "exec_mode": "cluster", "script": "./node_modules/nuxt/bin/nuxt.js", "merge_logs": true, "log_date_format" :"YYYY-MM-DD HH:mm", "max_memory_restart": "4000M", "env": { "HOST": "0.0.0.0", "PORT": 3000, "NODE_ENV": "production" } } ] }
 
 
pm2 start node_modules/nuxt/bin/nuxt.js -i max -- --port 3000 --host 0.0.0.0 --max-memory-restart 4000M --merge-logs --log-date-format=\"YYYY-MM-DD HH:mm\"
 
 

Recommendations