title: Getting "Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch" on Nodejs
body: <p>I'm developing an API on NodeJS using express and I'm getting this error while trying to deploy it to Heroku: </p>
  
  <blockquote>
    <p>Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch</p>
  </blockquote>
  
  <p>I am using the process.env.PORT variable, as I found here on SO, but it is still not working. Here's the index.js code:</p>
  
  <pre><code>var express = require('express');
  var app = express();
  var bodyParser = require("body-parser");
  app.use(bodyParser.json());
  var router = require("./router");
  app.use('/viatges', router);
  
  app.listen(3000 || process.env.PORT,function(){
      console.log("up and running on port "+process.env.PORT);
  });
  </code></pre>
  
  <p>Do you have any idea of what could be causing this issue?</p>
  
  <p>On the heroku logs i see this line  </p>
  
  <blockquote>
    <p>2017-04-01T11:44:07.091181+00:00 app[web.1]: up and running on port 27583</p>
  </blockquote>
  
  <p>so I assume the PORT enviornment variable is correctly set up...</p>