I have installed “let’s chat” on my server. In the documentation, they say to launch the application with
from the directory where the application is installed.
But i’m unable to launch it with systemd. I want the application to be always online. So it works if I manually launch
cd /MIDDLE/uow/lets-chat/ && /bin/npm start
but not if I configure the line in Execstart from systemd. I try with the same line, I try with npm, I try with “node ./apps.js” :
ExecStart=/usr/bin/cd /MIDDLE/uow/lets-chat/ && /usr/local/bin/node /MIDDLE/uow/lets-chat/app.js
(I try with or without absolute path for my command but it change nothing).
I don’t know how to launch this application as deamon in my centos. How can I do please ?
You need to set both
WorkingDirectory= to the appropriate values. For example:
WorkingDirectory=/MIDDLE/uow/lets-chat ExecStart=/usr/local/bin/node /MIDDLE/uow/lets-chat/app.js
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.