[root@admin ~]# cat /etc/systemd/system/nodebb.service
[Unit]
Description=NodeBB Forum platform
After=system.slice multi-user.target
[Service]
Type=simple
User=node
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=node
SyslogFacility=local0
WorkingDirectory=/home/node/forum/
ExecStart=/bin/node app.js
Restart=always
[Install]
WantedBy=multi-user.target
[root@admin ~]#
[root@admin ~]# uname -a
Linux localdomain 3.10.0-042stab112.15 #1 SMP Tue Oct 20 17:22:56 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@admin ~]#
service nodebb start
service nodebb restart
systemctl enable nodebb.service