Assuming that you have already installed Node.js on your system. If you haven't visit https://nodejs.org/en/download/package-manager/
sudo nano /lib/systemd/system/mygreatestapp.service
Put the following contents in it;
[Unit]
Assuming that you have already installed Node.js on your system. If you haven't visit https://nodejs.org/en/download/package-manager/
sudo nano /lib/systemd/system/mygreatestapp.service
Put the following contents in it;
[Unit]
Let's say you have a Node app running as service but you also want to save response in a custom log. Add following lines to your systemd service unit (/lib/systemd/system/myapp.service) file under the [Service] tag
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier='myapp'
Then reload systemd manager configuration
sudo systemctl daemon-reload