简体   繁体   English

使用upstart和Procfile运行node.js应用程序

[英]Running a node.js app with upstart and Procfile

I have a node.js application. 我有一个node.js应用程序。

I have written a Procfile with the following contents. 我写了一个包含以下内容的Procfile。

subscription-engine-processor: node index.js

Not sure whether i am doing it right, but i tried running it with the ruby gem foreman. 不确定我是否做得对,但我尝试用红宝石宝石领班运行它。

$ foreman start

nothing happens. 什么都没发生。 The process doesn't run. 该过程无法运行。

Please do comment on whether i am doing it right, if there's any other way of running this is my local. 请评论我是否正确行事,如果有任何其他方式运行这是我的本地。 What i ultimately want to do is to export this using upstart when its finally deployed in production. 我最终想做的是在最终部署到生产环境时使用upstart导出它。

I'm not exactly sure what foreman does, but I can give you the following links so that you can read more in depth tutorials on how to setup Node with Upstart: 我不完全确定工头是做什么的,但我可以给你以下链接,以便你可以阅读更深入的教程,了解如何使用Upstart设置Node:

http://howtonode.org/deploying-node-upstart-monit http://howtonode.org/deploying-node-upstart-monit
http://caolanmcmahon.com/posts/deploying_node_js_with_upstart http://caolanmcmahon.com/posts/deploying_node_js_with_upstart
http://dailyjs.com/2010/03/15/hosting-nodejs-apps/ http://dailyjs.com/2010/03/15/hosting-nodejs-apps/
http://blog.clock.co.uk/2011/04/11/deploying-node-js-apps/ http://blog.clock.co.uk/2011/04/11/deploying-node-js-apps/

Hope these help. 希望这些帮助。

你可能需要这个https://github.com/strongloop/node-foreman它是一个领班的节点端口。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM