-
Notifications
You must be signed in to change notification settings - Fork 74
Running via PM2
Sten Feldman edited this page May 22, 2017
·
6 revisions
PM2 is a production process manager for Node.js applications. Cloud9 repo includes a configuration file ecosystem.json
that makes it more easier to launch Cloud9 via pm2, monitor resource usage and even enables you to call a restart via terminal on the very same instance you are using it without having to log in via separate ssh terminal.
PM2 itself is not included with Cloud9. Install it globally by:
sudo npm install pm2 -g
Define the following variables:
-
C9_USERNAME
- Username to authenticate as -
C9_PASSWORD
- Password for authenticating the user -
C9_WORKSPACE
- Path to mount as the workspace
You can add environment variables for example in your ~/.profile
file as: export C9_USERNAME="test"
While in the Cloud9 directory, start the app process by:
pm2 cloud9 start
Stop the instance by:
pm2 cloud9 stop
Restart the instance by:
pm2 cloud9 restart
List resource usage:
pm2 list