2017-04-06 12:40:06 +01:00
|
|
|
# pm2
|
|
|
|
|
|
|
|
> Process manager for Node.js.
|
|
|
|
> Used for log management, monitoring and configuring processes.
|
|
|
|
|
|
|
|
- Start a process with a name that can be used for later operations:
|
|
|
|
|
|
|
|
`pm2 start {{app.js}} --name {{myapp}}`
|
|
|
|
|
|
|
|
- List processes:
|
|
|
|
|
|
|
|
`pm2 list`
|
|
|
|
|
|
|
|
- Monitor all processes:
|
|
|
|
|
|
|
|
`pm2 monit`
|
|
|
|
|
2017-05-01 11:16:05 +01:00
|
|
|
- Stop a process:
|
2017-04-06 12:40:06 +01:00
|
|
|
|
|
|
|
`pm2 stop {{myapp}}`
|
|
|
|
|
2017-05-01 11:16:05 +01:00
|
|
|
- Restart a process:
|
2017-04-06 12:40:06 +01:00
|
|
|
|
|
|
|
`pm2 restart {{myapp}}`
|