linux - How to Stop Node.js on Ubuntu and log out without stopping -


this question has answer here:

i put node application on ubuntu server. started program using

nodejs index.js 

now gives me "listening on *:3000"

the problem ssh'd ubuntu server, cursor stuck under "listening" line.

1) how can close ssh session , leave node running? should have started node different user?

2) once close ssh session , node still running. how can stop node once ssh server?

3) ssh server , start run nodejs file, want other simple work unrelated sites on same server. since cursor stuck after "listening" line, how can go doing else?

i suggest use screen program. screen terminal multiplexer, allows user access multiple separate terminal sessions inside single terminal window or remote terminal session (such when using ssh).

it can started typing screen on terminal. inside it, can call node.js usual. press ctrl+a , type d detach it. re-attach detached session type screen -r.

more information can found on manual


Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -