A pm2 plugin for zsh on ubuntu.
It provides some useful pm2 aliases to manage node.js apps run as www-data user.
Install plugin:
git clone git://github.com/mikcho/zsh-pm2 $ZSH_CUSTOM/plugins/zsh-pm2
Edit ~/.zshrc
to enable plugin:
plugins=(zsh-pm2)
Source ~/.zshrc
:
source ~/.zshrc
Add the plugin into ~/.zshrc
:
zplug "mikcho/zsh-pm2"
Start a node.js app:
pm2-www-start app.js --name "my-app"
Save all node.js apps to be restarted on system boots/reboots:
pm2-www save
Create the service for pm2 daemon:
pm2-www-startup
Remove the service for pm2 daemon:
pm2-www-unstartup
Copyright (c) 2017 Mik Cho - Released under the MIT license.