linux - How to Stop Node.js on Ubuntu and log out without stopping -
this question has answer here:
- how run node.js app background service? 23 answers
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
Post a Comment