【问题标题】:Running an IRC bot on Heroku在 Heroku 上运行 IRC 机器人
【发布时间】:2014-04-07 07:31:39
【问题描述】:

我的机器人已经启动并运行,我希望它在 Heroku 上运行,以保持它与我们的 IRC 频道的持续连接。这是我的 procfile 的内容:

web: coffee marvin.coffee

(机器人的名字是 marvin)。

这是marvin.coffee

irc = require 'irc'
config = require('./config').config

client = new irc.Client(config.server, config.nick, config.options)

# IRC-listeners 

我从不创建任何 HTTP 服务器,我希望可以在 Heroku 上简单地运行这个咖啡脚本,以便我的机器人运行,但我收到以下错误:

 Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch

机器人启动并加入频道,但由于 Heroku 因此错误而终止进程而立即离开。

任何帮助将不胜感激:-)

【问题讨论】:

    标签: node.js heroku coffeescript


    【解决方案1】:

    如果您将Procfile 中的web: coffee marvin.coffee 更改为bot: coffee marvin.coffee 是否有效?

    【讨论】:

    • fyi:正确的名称是worker 但文档说只有 web 是特殊的,其他进程类型可以任意命名。 devcenter.heroku.com/articles/procfile
    • 是的,所以没有“正确”的名称,除非你想要 Web 进程;)
    猜你喜欢
    • 2013-09-25
    • 2014-06-12
    • 1970-01-01
    • 2018-12-31
    • 2017-05-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-07-30
    相关资源
    最近更新 更多