Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Timeout when deploying on Bluemix #340

@mttrs

Description

@mttrs

I'm getting an error regarding timeout. The log says a correct listening port should be set. Should I set up a web server instead of just using controller.spawn() and startRTM() function?

Error restarting application: Start app timeout
TIP: Application must be listening on the right port. Instead of hard coding the port, use the $PORT environment variable.

Code: same as Basic Usage code

var Botkit = require('botkit');

var controller = Botkit.slackbot({});

// connect the bot to a stream of messages
controller.spawn({
  token: <my_slack_bot_token>,
}).startRTM()

// give the bot something to listen for.
controller.hears('hello',['direct_message','direct_mention','mention'],function(bot,message) {
  bot.reply(message,'Hello yourself.');
});
% cat Procfile
web: node app.js

% cat manifest.yml
applications:
- path: .
  memory: 128M
  instances: 1
  domain: mybluemix.net
  name: xxx-bot
  host: xxx-bot
  disk_quota: 1024M
  buildpack: https://github.com/cloudfoundry/nodejs-buildpack.git

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions