0
I have a Node application that I run with the command:
node server.js
But when I close the terminal where the command was executed, the application closes.
Researching found package npm Forever. I made the installation globally according to guidelines on the page, and running
forever server.js
The same thing happens. I close the window and the application closes. Does anyone know any alternative to running tasks from the background? Is it an incompatibility with the current version of Node?
Right... well.. I wanted something that would work like in the example of this video. https://youtu.be/P4mT5Tbx_KE In this video the command 'hohup npde server.js' And when it closes the temrinal window the server keeps running.
– Pier Bottero
I believe your main question has been answered by Joao. Regarding another service manager (for production), you can use the PM2.
– R. Zuini