S
S
Syndr0me2019-07-29 22:27:23
Node.js
Syndr0me, 2019-07-29 22:27:23

How to keep a node file active when the VPS server console is closed?

I apologize in advance if the question seems stupid, I did not find a solution if there is one at all.

I have a vps server on reg.ru, it runs postgre with a telegram bot on node.
I use putty to manage the server. That is, while the terminal is open, everything works, I close it stops working.
I would like to run a node file there, close the terminal and have the bot script hanging in working order, is this possible, and if so, by what means?

I tried to use nohup, but as far as I understand, closing the putty window, the server turns off

ps Found a solution, launched it through the console on the regru website, but maybe there are better solutions

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ivan Shumov, 2019-07-29
@Syndr0me

pm2, supervisor, systemd, nohup in the end?) probably still invented something

D
Dmitry, 2019-08-15
@Thelema

forever - https://www.npmjs.com/package/forever

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question