0

I have installed "let's chat" on my server. In the documentation, they say to launch the application with

npm start 

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 ?

Thank you,

A.

1

1 Answer 1

1

You need to set both ExecStart= and WorkingDirectory= to the appropriate values. For example:

WorkingDirectory=/MIDDLE/uow/lets-chat ExecStart=/usr/local/bin/node /MIDDLE/uow/lets-chat/app.js 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.