I am creating a Node.js app on Heroku and have run into an issue. I am trying to use Hook.io in my application but am getting a "Bad Bind" error from Heroku because Hook uses port 5000. Does anyone know of a way around this, maybe by somehow telling Heroku I need another port for Hook?
Asked
Active
Viewed 241 times
2 Answers
1
What you describe requires hook.io have access to bind to multiple TCP ports. I'm not sure how much success you will find on Heroku with this.
You'll also note that hook.io-webserver
has been deprecated see: https://github.com/hookio/webserver in favor of the latest core hook.io API which allows for native HTTP and Websocket support for hooks.
For new HTTP webserver API, see: https://github.com/hookio/hook.io/blob/master/examples/webserver/server.js

Marak
- 235
- 1
- 2
-
Yeah, I was afraid I was going to have trouble getting this to work on Heroku. I will look at those links, but I will probably just end up building it without Hook.io. Thanks. – kbjr Jun 28 '12 at 03:40
0
Hook.io is defaulting to port 5000, but on Heroku, you need to use the port Heroku dynamically assigns your app.
var hook = hookio.createHook({
hook-port: process.env.PORT || 5000
});
Here are the configs available for Hook.io.

redhotvengeance
- 27,446
- 10
- 49
- 54
-
Yes, but I am also running a webserver and I can't run both on the same port; So I guess what I really need to know is if there is a way around this, like getting a second port assigned to my app on Heroku so I can run both the webserver and Hook.io. – kbjr Jun 27 '12 at 04:22
-
-
I am trying to run my http server and most of the app in one hook and separating out a couple of heavier tasks into other hooks to keep from blocking the main process. I know this can be done in other ways (such as using fork), but I was hoping I could get it working with Hook.io – kbjr Jun 28 '12 at 03:38