This question already has an answer here:
I'm running a
node.js server off of a raspbian (Debian) machine, and I'd like to start and stop the server remotely. This for me means using
putty to access the shell, except when I close out of the
putty terminal or it times out my server goes down with it, because I just execute my server in the foreground.
So I'm wondering if there's a way to keep it going but still have a way to kill the process afterwards.