Help needed -Website based App is deploying on local terminal but not on Heroku

I have been stuck on this for a few hours.
The program gives an error

2020-03-19T21:47:01.925096+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2020-03-19T21:47:01.925348+00:00 app[web.1]: npm ERR! errno 1
2020-03-19T21:47:01.926328+00:00 app[web.1]: npm ERR! web-server@1.0.0 start: `node src/app.js`
2020-03-19T21:47:01.926427+00:00 app[web.1]: npm ERR! Exit status 1
2020-03-19T21:47:01.926548+00:00 app[web.1]: npm ERR!
2020-03-19T21:47:01.926634+00:00 app[web.1]: npm ERR! Failed at the web-server@1.0.0 start script.
2020-03-19T21:47:01.926714+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-03-19T21:47:01.943467+00:00 app[web.1]: 
2020-03-19T21:47:01.943869+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2020-03-19T21:47:01.944032+00:00 app[web.1]: npm ERR!     /app/.npm/_logs/2020-03-19T21_47_01_927Z-debug.log
2020-03-19T21:47:16.425637+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" request_id=46c59e27-9d41-451d-99f9-ff394aa965bc fwd="" dyno= connect= service= status=503 bytes= protocol=https

In package.json i have included

"scripts": {
    "start": "node src/app.js"

And in app.js i have given

const port= process.env.PORT || 3000
    console.log('Server is on port '+port)

I have restarted the server several times even refreshed the node versions but it doesnt work
github link to code is

1 Like

Did you ever get this resolved? Iā€™m having the same issue.

Hello and welcome to the FCC community~!

I recommend making your own topic, and sharing your code and the error you are encountering. This will allow us to better assist you. :slight_smile:

1 Like

Thank you! I will do that.