A unit file tells systemd how to manage a service. In a [Service] section, ExecStart gives the command, User the user to run as and Restart the restart policy; [Install] specifies when to enable it. After modification, run systemctl daemon-reload.
Example
[Service] ExecStart=/usr/bin/node /srv/app/index.js Restart=on-failure User=app