Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

593
Vistas
Getting "Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch" on Nodejs

I'm developing an API on NodeJS using express and I'm getting this error while trying to deploy it to Heroku:

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

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:

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);
});

Do you have any idea of what could be causing this issue?

On the heroku logs i see this line

2017-04-01T11:44:07.091181+00:00 app[web.1]: up and running on port 27583

so I assume the PORT enviornment variable is correctly set up...

about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Nevermind, i just fixed it. I changed the order of the operands in the OR, I assume javascript just went with the first as it was defined.

It now looks like this:

app.listen(process.env.PORT || 3000 ,function(){
    console.log("up and running on port "+process.env.PORT);
});
about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda