Answer the question
In order to leave comments, you need to log in
How to make node.js script run after console exit?
I created a droplet on digital ocean and I am making an application on node js. I run the script itself through Nodemon. The problem is that after starting I want to close the console and then the application stops. How can I run so that the script does not stop after exiting the console?
Answer the question
In order to leave comments, you need to log in
https://www.digitalocean.com/community/tutorials/h...
https://www.axllent.org/docs/view/nodejs-service-w...
И куча ссылок в гугле
systemd run node app
Запускаю node данной командой и при закрытии процесс остаетсяnohup node app.js &
Амперсанд добавь через пробел:
#mynodeapp -params &
А лучше скрипт загрузки в /etc/init.d/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question