javascript - 无法通过 "&"使 nodejs 在后台工作

标签 javascript linux node.js ubuntu background

我正在尝试在后台启动 nodejs 服务器:

nodejs  my_app.js &

但它显示了调试消息(“Starting at 0.0.0.0 ...”),然后我通过 ssh 断开了与我的服务器的连接,它终止了。为什么?

最佳答案

尝试:

<strong>nohup</strong> node my_app.js &

http://www.tutorialspoint.com/unix_commands/nohup.htm

关于javascript - 无法通过 "&"使 nodejs 在后台工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35744615/

相关文章:

javascript - Protractor : directConnect 不支持 browserName 'chrome'

javascript - 如何在 jQuery 中的滚动上添加事件类?

linux - 无法终止循环休眠的 Bash 命令

c# - 将套接字服务器从 Node.js 移植到 C#

node.js - 使用 Yeoman/Grunt 设置 Jade 进行模板化的正确方法

node.js - 独立 Node 脚本需要集群?

javascript - 我对这个 Angularjs ng-repeat 做错了什么?

Python操作系统输出

linux-shellscript- "$#"

javascript - 根据文件路径字符串创建对象