将JS应用程序部署到Heroku-错误H10 503错误,应用程序崩溃

时间:2020-05-09 14:07:07

标签: javascript heroku deploying

我的应用程序-https://github.com/amyequinn/weatherApp在终端上运行npm start时运行完美,但是将应用程序部署到Heroku时崩溃了,我找不到解决方案。错误是H10,获取方法应用崩溃,状态503 ...

“ 2020-05-08T23:13:34.132652 + 00:00 heroku [router]:at =错误代码= H10 desc =”应用程序崩溃“方法= GET路径=” /“主机= weather-app-using- api.herokuapp.com request_id = edd028a6-ce4c-4b5f-b3c0-229af9eb24fb fwd =“ 80.189.121.112” dyno = connect = service = status = 503 bytes = protocol = https

2020-05-08T23:13:34.964932 + 00:00 heroku [router]:at =错误代码= H10 desc =“应用程序崩溃”方法= GET路径=“ /”主机= weather-app-using-api .herokuapp.com request_id = 63ded901-6716-4f7a-8f8a-fe0409a9349d fwd =“ 80.189.121.112” dyno = connect = service = status = 503 bytes = protocol = https

2020-05-08T23:13:36.414179 + 00:00 heroku [router]:at =错误代码= H10 desc =“应用程序崩溃”,方法= GET path =“ / favicon.ico”主机= weather-app- using-api.herokuapp.com request_id = 60c048dd-edbd-405d-aee7-740983dbdedf fwd =“ 80.189.121.112” dyno = connect = service = status = 503bytes = protocol = https“

任何想法?

非常感谢帮助!!谢谢:)

1 个答案:

答案 0 :(得分:0)

我通过遵循以下建议使它正常工作-https://codeburst.io/deploy-your-webpack-apps-to-heroku-in-3-simple-steps-4ae072af93a8

创建了server.js文件,并包含上面链接的内容,确保我的文件路径正确。

在终端上运行“ webpack -p”和“ npm run dev”或“ node server.js”

它已成功发布到https://weather-app-using-api.herokuapp.com/上的Heroku中