sajak upadhyaya
sajak upadhyaya

Reputation: 121

Heroku deployment crashing at start Nodejs

I am trying to deploy my existing NodeJS application to heroku. I followed all the process listed in the documentation.

I wrote this on my procfile:

web: node ./bin/www

but I am constantly getting:

Process exited with status 1 2016-08-08T11:07:54.028983+00:00 heroku[web.1]: State changed from starting to crashed 2016-08-08T11:07:56.852268+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=agile-headland-49936.herokuapp.com request_id=357f1a83-adff-4353-8e6b-6f8166cdb09b fwd="202.166.207.112" dyno= connect= service= status=503 bytes=

Upvotes: 2

Views: 497

Answers (1)

Pramesh Bajracharya
Pramesh Bajracharya

Reputation: 2263

web: node ./bin/www this gives me a hint that you are making an Express App. Your package.json might have something like:

"scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "node ./bin/www"
 }

You can just place web: npm start in your Procfile. This should work. Hope this helps :)

Upvotes: 1

Related Questions