当我试图将我的NestJS应用程序部署到Heroku时,我看到了错误Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch。
为什么将url设置为0.0.0.0 使其工作?
const port = process.env.PORT || 5000;
await app.listen(port, '0.0.0.0');上下文:
0.0.0.0的情况下部署时,我的应用程序说Listening at http://127.0.0.1:<randomNumber>0.0.0.0进行部署时,我的应用程序说Listening at http://127.0.0.1:<randomNumber>NPM_CONFIG_PROD=false"@nestjs/common": "^8.0.0",
"@nestjs/core": "^8.0.0",
"@nestjs/platform-fastify": "^8.0.11",发布于 2021-12-25 00:50:54
https://stackoverflow.com/questions/70474154
复制相似问题