nohup command & 或者 tmux Simply put, your program process is a child process of ssh, so when the parent process exits, the child process will also exit.
Express has an advanced chapter, the address is here http://expressjs.com/zh-cn/ad..., you can use the process manager to close the terminal server and the nodejs project is still running, you can check it out
nohup command &
或者
tmux
Simply put, your program process is a child process of ssh, so when the parent process exits, the child process will also exit.
Recommended to use
pm2
或者forever
Understand the principles of SIGHUP and learn to use one or more of nuhup/screen/tmux/service management (initd or systemd)
When the terminal is closed, all processes belonging to it end. You can use pm2, or simply add
at the end&
(with space)Express has an advanced chapter, the address is here http://expressjs.com/zh-cn/ad..., you can use the process manager to close the terminal server and the nodejs project is still running, you can check it out