Hapi server on heroku fails to bind port

会有一股神秘感。 提交于 2019-12-04 08:21:37

process.env.HOST was undefined on Heroku, and for some reason it didn't like localhost as the host, which caused the issue.

I simply removed the host var all together, so connection looks like:

server.connection({
  port: process.env.PORT || 3000,
  labels: ['api'],
})
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!