You could also use screen.
To install it
apt-get update && apt-get install -yf screen
(I think).
Then, create a new screen using
screen -S nodeserver
(replace nodeserver withwhatever name you want to give to the screen. DO NOT LEAVE THIS BLANK!. Leaving this blank makes it hard to shut down).
Once you are using the screen, it acts like its own terminal. So, just start your
server from there. Then, press
Ctrl + a
d
To get out of the screen. The screen will continue to run in the background, and will not disconnect. The upside of this is is that you can later reconnect to the screen using
screen -r nodeserver
(see why I said to make it memorable? Otherwise, it would be assigned a random number, which is harder to use but can be found throw using screen -list
)
So, if there were any errors thrown, or you logged something, all of that information would still be availble. Please note that screen does not always play nice if you are using ssh.
If for some reason the screen freezes, then that is a problem, but I think that you can fix it using
screen -S nodeserver -X quit
or something of the like (anyone else, please feel free to change this if this is wrong).