2 years ago
#62321
edodiy
cannot access a node.js app started via systemd
I have a node app that I'm trying to start as a service. The app works fine if I start it from the command line like so: node app.js
. In that case the process looks like: edoadmin 5003 4980 0 20:39 pts/0 00:00:00 node app.js
, and the app is available from the browser.
If I create a service and enable it (sudo systemctl enable splitflap.service
):
Description=Splitflap app
Documentation=
After=network.target
[Service]
Type=simple
User=edoadmin
ExecStart=node /home/edoadmin/projects/splitflap/Split-Flap/app.js
Restart=on-failure
[Install]
WantedBy=multi-user.target
The process looks like:
edoadmin 921 1 0 Jan16 ? 00:00:00 /usr/bin/node /home/edoadmin/projects/splitflap/Split-Flap/app.js
but when I try to access the web app, I get the following error:
Cannot GET /
in the browser.
node.js
systemd
0 Answers
Your Answer