Create a MeteorJS (NodeJS) service

Sat Dec 29 2018 06:31:25 GMT+0100 (Mitteleuropäische Normalzeit), Administrator

Create Node JS service
nano /lib/systemd/system/{name}.service

[Unit]
Description={name}
After=network-online.target

[Service]
User={meteor user}
Restart=on-failure
WorkingDirectory={wd}
ExecStart= /bin/bash -c 'export MONGO_URL={mongouri} ; export ROOT_URL={rooturi} ; export PORT={port} ; export METEOR_SETTINGS="$(/bin/cat {pathTosettings.json})" ; {fullPathToNodeExecutable} {pathToNode.jsServerScript}'

[Install]
WantedBy=multi-user.target

reload daemon files
systemctl daemon-reload

enable service
systemctl enable {name}

aand start...
service {name} start


Tags

Follow us

Latest blogs
Aus E-Books, Books basteln (2)
Sat Aug 03 2019 22:08:21 GMT+0200 (Mitteleuropäische Sommerzeit)
Aus E-Books, Books basteln (1)
Sat Aug 03 2019 05:25:04 GMT+0200 (Mitteleuropäische Sommerzeit)
2FA mit PAM und Google Authenticator unter Ubuntu
Mon Dec 31 2018 00:31:29 GMT+0100 (Mitteleuropäische Normalzeit)
Create a MeteorJS (NodeJS) service
Sat Dec 29 2018 06:31:25 GMT+0100 (Mitteleuropäische Normalzeit)
How I hacked my Pavlok to hack myself
Wed Dec 26 2018 00:39:41 GMT+0100 (Mitteleuropäische Normalzeit)