在 Cygwin 上将 Node.js 作为服务运行
我正在尝试通过 cygwin 作为服务运行 Node.js http 服务器,以便即使我注销后它也能继续运行(机器仍在运行)。我能找到的最接近的是:
cygrunsrv -I service_name-p path [-a arguments]
[-e VAR=VALUE] [-t auto|manual] [-u user] [-w passwd]
用作
cygrunsrv -I nodeserver -p /usr/local/bin/node -a ~/server.js
但似乎运行不正常...不确定我做错了什么或者这是否可能
I'm trying to run a Node.js http server through cygwin as a service, so that it continues to run even once I've logged out (machine still running). The closest I've been able to find is:
cygrunsrv -I service_name-p path [-a arguments]
[-e VAR=VALUE] [-t auto|manual] [-u user] [-w passwd]
used as
cygrunsrv -I nodeserver -p /usr/local/bin/node -a ~/server.js
but that doesn't seem to run properly... Not sure what I'm doing wrong or if this is possible
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
天啊,看来节点工作人员是问题背后的原因。它运行了,但是那部分馅饼不起作用......哦,好吧。至少我弄清楚了。
D'oh, seems like node-worker was the cause behind the probem. It runs but that part of the pie wasn't working... Oh well. At least I figure it out.