Running NodeJS as services in Debian or Ubuntu is quite easy, especially we are using tools like “runit”. The only requirements here is make sure your “node” located in “/usr/local/bin”, so it’s can be called globally.
We need to install Runit by :
sudo apt-get install runit
Now, we ready to configure nodejs applications running as services.
1. Create folder services in /etc
We need to make folder “/etc/sv” ownership into our user (not root). In debian we are using “admin” or in Ubuntu using “ubuntu”.