Skip to content

Instantly share code, notes, and snippets.

@nithinkashyapn
Forked from yagop/node-js-app.service
Created July 5, 2021 06:09
Show Gist options
  • Select an option

  • Save nithinkashyapn/139e3a77a5749a9c18e72918a021f9a6 to your computer and use it in GitHub Desktop.

Select an option

Save nithinkashyapn/139e3a77a5749a9c18e72918a021f9a6 to your computer and use it in GitHub Desktop.
Nodejs Systemd service example
[Unit]
Description=Node.js App
After=network.target
[Service]
Type=simple
ExecStart=/usr/local/node-v7.4.0/bin/node index.js
WorkingDirectory=/home/yago/produccion/app
Environment="HOST=127.0.0.1"
Environment="PORT=1234"
User=yago
Group=yago
Restart=always
RestartSec=3
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment