Last active
July 9, 2019 03:27
-
-
Save ryanburnette/a008fc7bcebda4e7a7335d1f304c6cfe to your computer and use it in GitHub Desktop.
Notes on running NodeJs as a systemd service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=service | |
After=network.target | |
[Service] | |
Type=simple | |
User=ubuntu | |
WorkingDirectory=/opt/service | |
ExecStart=/bin/bash -c 'exec bin/node app.js 2>&1 >> logs/console.log' | |
Restart=always | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@coolaj86 just DEPRECATED this approach in favor of https://git.coolaj86.com/coolaj86/go-serviceman