Small garage of one Ford in the big internet
Создать файл /etc/systemd/system/prerender.service со следующим содержанием
[Unit]
Description=Prerender
After=syslog.target network.target
[Service]
Environment=NODE_ENV=production PORT=3000
ExecStart=/home/prerender/.nvm/versions/node/v12.16.1/bin/node /home/prerender/.local/opt/prerender/server.js
WorkingDirectory=/home/prerender/.local/opt/prerender/
KillMode=process
KillSignal=SIGINT
Restart=always
RestartSec=3
SyslogIdentifier=prerender.js
User=prerender
[Install]
WantedBy=multi-user.target
systemctl daemon-reload
systemctl enable prerender
service prerender start