N
N
Nikolai Antonov2016-10-10 18:22:05
Node.js
Nikolai Antonov, 2016-10-10 18:22:05

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

3 answer(s)
Александр Таратин, 2016-10-10
@Taraflex

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 &

R
Roman Sokolov, 2016-10-10
@jimquery

Амперсанд добавь через пробел:
#mynodeapp -params &
А лучше скрипт загрузки в /etc/init.d/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question