1
votes

My app - https://github.com/amyequinn/weatherApp runs perfectly running npm start on terminal however when deploying the app to Heroku it crashes and I cannot find the solution. The error is H10, App Crashed at Get method, Status 503...

"2020-05-08T23:13:34.132652+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=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=error code=H10 desc="App crashed" method=GET path="/" host=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=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=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"

Any ideas??

Help is much appreciated!! Thank you :)

1

1 Answers

0
votes

I got it working by following this advice - https://codeburst.io/deploy-your-webpack-apps-to-heroku-in-3-simple-steps-4ae072af93a8

created server.js file and included content linked above, making sure my file paths were correct.

ran 'webpack -p' and 'npm run dev' or 'node server.js' in terminal

It was published successfully to Heroku on https://weather-app-using-api.herokuapp.com/