christianalfoni / webpack-express-boilerplate

A boilerplate for running a Webpack workflow in Node express
MIT License
1.4k stars 292 forks source link

Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch #53

Open gordillo99 opened 8 years ago

gordillo99 commented 8 years ago

Hello,

first of all thanks for this. it's awesome and I hope I can use it for my future projects :) I'm having a problem deploying to Heroku. I was wondering if you could help me :/ it seems the port cannot be resolved? I added the deploy.js script and the script instructions on the package.json as you said on your article. Could you please take a look at my server.js file? thanks in advance! (I just started with web dev)

https://github.com/gordillo99/fixo

gordillo99 commented 8 years ago

and here's the output:

2016-06-10T03:20:48.811226+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch 2016-06-10T03:20:48.811419+00:00 heroku[web.1]: Stopping process with SIGKILL 2016-06-10T03:20:49.686488+00:00 heroku[web.1]: Process exited with status 137 2016-06-10T03:20:49.702684+00:00 heroku[web.1]: State changed from starting to crashed 2016-06-10T03:20:57.706265+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=fixo.herokuapp.com request_id=dc920794-499f-4508-a08b-4ed40255eb21 fwd="184.66.39.229" dyno= connect= service= status=503 bytes= 2016-06-10T03:20:58.369882+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=fixo.herokuapp.com request_id=44d3dd8c-37f6-43d7-afab-36ea41fd903d fwd="184.66.39.229" dyno= connect= service= status=503 bytes=

christianalfoni commented 8 years ago

Hi @gordillo99 , yeah, in Heroku go to settings and add a new "config var":

key NODE_ENV

value production

That should do it :)

Odywan55 commented 8 years ago

Can any-body advice me the way of handling server changes, with no rerun the server manualy, and working with routes on it, thanks a lot !!

hahasecu commented 6 years ago

I had the same error. I changed the port as below, and it works

app.listen(process.env.PORT || 5000);