Question

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?

Was it helpful?

Solution

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

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top