문제

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?

도움이 되었습니까?

해결책

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

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top