NodeJS Running as a service
Node.js as a systemd dæmon
systemd is the de facto init system in most Linux distributions. After Node has been configured to run with systemd, it's possible to use the service command to manage it.
First of all, it needs a config file, let's create it. For Debian based distros, it will be in /etc/systemd/system/node.service
It's now possible to respectively start, stop and restart the app with:
To tell systemd to automatically start node on boot, just type: systemctl enable node.
That's all, node now runs as a dæmon.