Skip to content

Instantly share code, notes, and snippets.

@yagop
Created January 7, 2017 15:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save yagop/e06f21b5ebd4a14467a75d45e9fc01c4 to your computer and use it in GitHub Desktop.
Save yagop/e06f21b5ebd4a14467a75d45e9fc01c4 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