我尝试将使用Node.js编写的Discord机器人部署到Heroku,构建成功但应用程序崩溃并抛出错误:
Error R10 (Boot timeout)
Web process failed to bind to $PORT within 60 seconds of launch
我的Procfile
文件:
web: node app.js
package.json
:
{
"name": "bot",
"version": "5.0",
"description": "Discord Bot",
"main": "app.js",
"scripts": {
"start": "node app.js"
},
"author": "me",
"license": "MIT",
"dependencies": {
"discord.js": "^11.3.2",
"ffmpeg-binaries": "^3.2.2-3",
}
}
我的应用程序在本地启动需要几秒钟时间。如何解决这个问题?