heroku上的Hapi服务器无法绑定端口 [英] Hapi server on heroku fails to bind port

查看:177
本文介绍了heroku上的Hapi服务器无法绑定端口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为ReactJS应用程序开发Hapi服务器,但是当我尝试部署到Heroku时,出现R10错误无法在启动后的60秒内绑定到$ PORT。到底是怎么回事?我正在使用process.env.PORT。我也尝试过parseInt()。还尝试禁用不同的软件包。



在Heroku日志中,我看到来自index.js(Hapi running on ...)的控制台日志,但是R10错误出现,服务器重新启动,然后崩溃。

==>

I'm working on a Hapi server for a ReactJS app but when I try to deploy to Heroku, I get the R10 error "Failed to bind to $PORT within 60 seconds of launch". What is going on? I'm using process.env.PORT. I also tried parseInt() around it. Also tried disabling varying packages. The build is successful always.

In the Heroku logs, I see the console log from the index.js ("Hapi running on ...") but then the R10 error shows up and the server restarts, then crashes.

==>

这篇关于heroku上的Hapi服务器无法绑定端口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆