我将我的应用程序部署到Heroku。这是一个node.js + express + socket.io应用程序,这是package.json文件
{
"name": "game_test",
"author": "Ilya",
"description": "A test app for our board game",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "node app"
},
"dependencies": {
"express": "3.0.6",
"jade": "*",
"socket.io" : "*"
},
"engines": {
"node": "0.8.14"
}
}这是我得到的日志:
heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=game-test-1.herokuapp.com fwd=37.26.146.185 dyno= queue= wait= connect= service= status=503 bytes=
heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=game-test-1.herokuapp.com fwd=37.26.146.185 dyno= queue= wait= connect= service= status=503 bytes=什么意思?
发布于 2013-06-09 06:40:10
在这里找到适合我的解决方案:Heroku + node.js error (Web process failed to bind to $PORT within 60 seconds of launch)
app.listen(process.env.PORT || 3000, function(){
console.log("Express server listening on port %d in %s mode", this.address().port, app.settings.env);
});发布于 2016-01-12 22:46:19
我刚刚在我的应用程序上遇到了类似的问题,我在迁移数据库后遇到了这个问题,在尝试了许多选项后,一个对我有帮助的是:
heroku restart(使用用于mac的Heroku工具带)
发布于 2019-02-20 23:54:49
我有这个问题,唯一的问题是我的Procfile是这样的
web : node index.js我改成了
web:node index.js唯一的问题是空格
https://stackoverflow.com/questions/14322989
复制相似问题