How to configure supervisord to maintain up the nodejs forever from scratch

This is the fast way:

apt-get install python-setuptools

easy_install supervisor

echo\_supervisord\_conf > /etc/supervisord.conf

npm install -g supervisor

supervisor app.js

The production way, instead of using the supervisior binary change the supervisord.conf like in this page

 

Enjoy!