[英]App crashed H10 error code, when uploading to Heroku
I have a node app, which is running locally without any problem, but when I try to deploy it with heroku, I cannot do it. 我有一个节点应用程序,它在本地运行没有任何问题,但是当我尝试用heroku部署它时,我做不到。 The error that I get is:
我得到的错误是:
2017-05-26T13:37:31.249587+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=engageitvisz.herokuapp.com request_id=e9641b76-0667-44ce-b85a-fb431c1cca2a fwd="31.10.149.171" dyno= connect= service= status=503 bytes= protocol=httpsI am using the mongoLab at my application, but I added it as addon in heroku.
{
"name": "engageit",
"version": "1.0.0",
"description": "EngageIt visualization",
"main": "server.js",
"dependencies": {
"express": "4.13.1"
},
"repository": {
"type": "git",
"url": "https://github.com/VitezKoja92/EngageItVisz.git"
},
"scripts": {
"test": "test",
"start": "node server.js",
"heroku-prebuild": "echo This runs before Heroku installs your dependencies.",
"heroku-postbuild": "echo This runs afterwards."
},
"author": "Danilo Krasic",
"license": "ISC",
"keywords": [
"node",
"heroku",
"express"
],
"engines": {
"node": "7.7.2"
}
}
Procfile: Procfile:
web: node server.js
package.json: 的package.json:
{ "name": "engageit", "version": "1.0.0", "description": "EngageIt visualization", "main": "server.js", "dependencies": { "express": "4.13.1" }, "repository": { "type": "git", "url": "https://github.com/VitezKoja92/EngageItVisz.git" }, "scripts": { "test": "test", "start": "node server.js", "heroku-prebuild": "echo This runs before Heroku installs your dependencies.", "heroku-postbuild": "echo This runs afterwards." }, "author": "Danilo Krasic", "license": "ISC", "keywords": [ "node", "heroku", "express" ], "engines": { "node": "7.7.2" } }
Please, let me know if you have any suggestion, as I am trying to solve this for hours. 请,如果您有任何建议,请告诉我,因为我正在努力解决数小时。
That looks like a URI connection string that you got straight from MongoLab. 看起来像是直接从MongoLab获得的URI连接字符串。 Try making sure that you are getting the correct connection URI from the MongoLab Heroku addon by entering the following command at the root of your project as per the Heroku help pages:
根据Heroku帮助页面,在项目的根目录下输入以下命令,以确保从MongoLab Heroku插件中获取正确的连接URI:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.