문제

In SSH if I run:

$ node server

My web app works fine until I close the SSH session. What is the command or configuration needed so that it runs all the time without an active SSH session?

도움이 되었습니까?

해결책

you can run it like:

nohup node server

Or you can install forever.

npm -g install forever
forever start server

다른 팁

If you have multiple nodejs, you can use pm2 to manage them.

Or, use screen or tmux to keep the nodejs running while detach the session.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top