Faster, Higher, Stronger

Keep Nodejs Program Running after Closing SSH

I happened to find that although my Nodejs program can run normally when I started it through SSH. If I close the SSH connection, then I can no longer visit corresponding frontend file through my browser. Oh my god, the program was closed automatically the time I closed the SSH connection. Here is the solution to the problem:

(nohup npm run start &)

Note that the command “npm run start” is the command to start my Nodejs program, it may differ from your program, and if so, you should replace the command “npm run start” with your program-starting command.

赞(0) 打赏
转载需注明来源并给出来源页链接:峰间的云 » Keep Nodejs Program Running after Closing SSH

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址