After installing and setting up node.js on my development VM running Ubuntu 11.10, I would like supervisor to start automatically on boot, calling and reloading node.js when needed.
Below snippet works well when ran by my default user in terminal, but how can I get it to run on boot?
cd /var/ && supervisor -w www www/myapp/app.js
Thanks
Upstart plus monit works quite well to get everything running at boot time and keep node processes up. Plus you can use npm to install them. Here's a tut.
I'm not sure why supervisor would need to run at boot (logically, the only time you'd need this is while you're uploading new files), but I'd imagine it could be started at boot by just creating a new upstart config (using the same tut above for a foundation):
I'm not sure you would need monit for this case, since supervisor has its own --restart-on-error.
And here's a whole different approach, using a wrapper, which you would invoke instead of your app.js. It looks quite interesting.