In a development environment to run a node.js script you type node app.js
. However once you deploy your program on an actual Linux sever if you close the terminal it stops running your script. Is there a command that I can run that keeps that script running in the background even after closing the terminal?
You could definitely use Forever (https://github.com/foreverjs/forever) for this, however some newer linux distributions allow you to config services using systemd which is considered the better practice since it overlaps a bit with Forever in functionality.
You will easily find more information about it with a quick google search.