A
A
Arseniy Kornilov2020-11-30 10:19:11
Node.js
Arseniy Kornilov, 2020-11-30 10:19:11

How can nodejs server "self-reload" be implemented?

Good day, I want to create something like a scheduled reboot, in general, so that the server can reboot itself without the intervention of the terminal.

Ideally, I want something like this
process.restart();

. In general, you can do anything (if at all possible)
And no, I don’t need nodemon , but the code that will restart the server when called

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Anton, 2020-11-30
@badcarrot

pm2 + one of the endpoints implementing https://pm2.keymetrics.io/docs/usage/pm2-api/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question