Skip to content

Instantly share code, notes, and snippets.

@BaezCrdrm
Created May 24, 2021 16:56
Show Gist options
  • Save BaezCrdrm/7a03279ebfade4c629d049980e258a08 to your computer and use it in GitHub Desktop.
Save BaezCrdrm/7a03279ebfade4c629d049980e258a08 to your computer and use it in GitHub Desktop.
Systemd service
[Unit]
Description="Service name"
[Service]
ExecStart=/usr/bin/node <Entry file -> index.js>
WorkingDirectory=<Path to project>
Restart=always
RestartSec=10
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=<Project sys log name>
Environment=NODE_ENV=production PORT=3000
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment