Answer the question
In order to leave comments, you need to log in
How to create a service in NodeJS?
I am creating a service using https://support.microsoft.com/en-us/help/251192/ho...
The creation line is something like this
Sc create Element2 binPath="C:\Program Files\nodejs\node C:\Program Files\Element2\index.js --config C:\ProgramData\Element2\config.js" DisplayName="Element 2" start=auto
Answer the question
In order to leave comments, you need to log in
You are creating a service from a program that is not a service. Naturally, it won't work.
First google link: stackoverflow.com/questions/10547974/how-to-install...
use pm2 daemon
command
example
pm2 start app.js --name myservice
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question