Skip to content

Instantly share code, notes, and snippets.

@almoore
Created December 18, 2017 03:59
Show Gist options
  • Save almoore/34fbb44b6a8433d317136fb8da0d2f64 to your computer and use it in GitHub Desktop.
Save almoore/34fbb44b6a8433d317136fb8da0d2f64 to your computer and use it in GitHub Desktop.
Systemd node start script
[Unit]
Description=hello_env.js - making your environment variables rad
Documentation=https://example.com
After=network.target
[Service]
Environment=NODE_PORT=3001
Type=simple
User=root
ExecStart=/usr/bin/node /home/ubuntu/hello_env.js
Restart=on-failure
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment