How to ping hubot deployed on heroku

90 views Asked by At

I have simple hubot app deployed at heroku. I have set the procfile and its running properly when I check the logs using heroku logs -t

coffee script:

module.exports = (robot) ->

   robot.hear /room/i, (res) ->
    res.send "welcome " + res.message.room

procfile:

web: bin/hubot -a campfire --name rsc

Logs:

2016-12-17T11:20:53.198149+00:00 heroku[web.1]: Restarting
2016-12-17T11:20:53.198657+00:00 heroku[web.1]: State changed from up to startin
g
2016-12-17T11:20:53.978046+00:00 heroku[web.1]: Stopping all processes with SIGT
ERM
2016-12-17T11:20:54.099831+00:00 heroku[web.1]: Process exited with status 0
2016-12-17T11:20:54.832775+00:00 heroku[web.1]: Starting process with command `b
in/hubot -a campfire --name rsc`
2016-12-17T11:21:00.807546+00:00 heroku[web.1]: State changed from starting to u
p
2016-12-17T11:21:00.535290+00:00 app[web.1]: [Sat Dec 17 2016 11:21:00 GMT+0000
(UTC)] ERROR hubot-heroku-alive included, but missing HUBOT_HEROKU_KEEPALIVE_URL
. `heroku config:set HUBOT_HEROKU_KEEPALIVE_URL=$(heroku apps:info -s  | grep we
b-url | cut -d= -f2)`
2016-12-17T11:21:00.675448+00:00 app[web.1]: [Sat Dec 17 2016 11:21:00 GMT+0000
(UTC)] INFO hubot-redis-brain: Discovered redis from REDISCLOUD_URL environment
variable
2016-12-17T11:21:00.768728+00:00 app[web.1]: [Sat Dec 17 2016 11:21:00 GMT+0000
(UTC)] INFO hubot-redis-brain: Successfully authenticated to Redis
2016-12-17T11:21:00.784649+00:00 app[web.1]: [Sat Dec 17 2016 11:21:00 GMT+0000
(UTC)] INFO hubot-redis-brain: Data for hubot brain retrieved from Redis

Now from where do I ping to hubot? From campfire website? I did but its not responding

1

There are 1 answers

1
Andrei Karpuszonak On

I believe you need two parameters in the route, and you have only one (res):

   robot.hear /room/i, (req, res) ->
     res.send "welcome " + res.message.room