Run Jelastic Node.js application via supervisor
Supervisor is a handy little tool to keep your Node.js app running (auto restart if it goes down due to fatal errors), and automatically restart your app if it detects file changes.
It saves you the trouble of hunting for and killing the old process in such cases, so your development speed can be much faster.
Here’s how to run your Node app via supervisor on Jelastic.
1. Connect to your Node ‘node’ via SSH
2. Execute the following commands
sudo /etc/init.d/cartridge stop cd ~/ROOT/ supervisor --debug server.js &
3. Set up a cron to make this the default at server boot
Edit your crontab:
crontab -e
Add the following entry on a new line:
@reboot sudo /etc/init.d/cartridge stop && cd ~/ROOT/ && supervisor --debug server.js &
Save and quit with
:wq
Need More Help?
If you're still having problems, get in touch with our 24/7 support team! We'll be more than happy to help.