node.js forever模块
感觉LZ需要的是这个
(node app &)
或者
nohup node app &
nohup node xxx.js > /tmp/log.txt 2>&1 &
这个只能Kill掉么?
@bigfang 谢谢 我弄明白了
我的0.10 .7 nodejs版本使用forever 不知道为什么运行不来
学习了
在 ubuntu 上,用 upstart 很方便。
我的 upstart 的例子
sudo cp fetch.conf /etc/init/fetch.conf
sudo start fetch sudo stop fetch
fetch.conf 内容:
#!upstart description "Fetch server" start on started mountall stop on shutdown # Automatically Respawn: respawn respawn limit 99 5 exec node /home/user/server.js -app=fetch >> /var/log/fetch.log 2>&1
http://caolanmcmahon.com/posts/deploying_node_js_with_upstart/
@guotingchaopr 你看看是不是命令的事啊,我用forever start,启动之后程序就能一直运行。 命令如下:forever start app.js
谢谢 这个确实非常棒
@wannianchuan 我再尝试下
后台运行
CNode 社区为国内最专业的 Node.js 开源技术社区,致力于 Node.js 的技术研究。
node.js forever模块
感觉LZ需要的是这个
或者
nohup node xxx.js > /tmp/log.txt 2>&1 &
这个只能Kill掉么?
@bigfang 谢谢 我弄明白了
我的0.10 .7 nodejs版本使用forever 不知道为什么运行不来
学习了
在 ubuntu 上,用 upstart 很方便。
我的 upstart 的例子
fetch.conf is a config file for upstart
sudo cp fetch.conf /etc/init/fetch.conf
sudo start fetch sudo stop fetch
fetch.conf 内容:
http://caolanmcmahon.com/posts/deploying_node_js_with_upstart/
@guotingchaopr 你看看是不是命令的事啊,我用forever start,启动之后程序就能一直运行。 命令如下:forever start app.js
谢谢 这个确实非常棒
@wannianchuan 我再尝试下
后台运行