一个简单的django聊天应用程序可以在本地完美运行。但是当我尝试将它部署到heroku上时,它在日志中显示了"Error R10 (Boot timeout) -> Web process failed to bind to $PORT in 60 s of launch“。在proc文件中,我添加了"web: python server.py“。它在本地的9999端口上运行。但是如何使用heroku处理端口9999呢?
发布于 2016-02-19 23:00:28
请参阅此问题:
Setting the port for node.js server on Heroku
你不能指定你想在Heroku上使用哪个端口。
Heroku将其设置为“自动”,因此您应该读取环境中的PORT变量,然后使用该变量。
heroku config:get PORT
https://stackoverflow.com/questions/35465867
复制相似问题