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

248
Vistas
Successful build on Heroku, but causes endless loading when trying to access it

I have simple Node Express app with one route that I need to deploy on Heroku - When I run command - git push heroku master, it is build successfully. After generating the link - I am trying to access it, but all I am getting is Aplication Error.

When checking the console by heroku logs --tail, this is the output:

enter image description here

And I checked my dashboard and everything looks fineenter image description here

This is the first time using Heroku so I am not sure what it can cause, from my research it might often be missing script in package.json, but I added that

{
    "name": "myApp",
    "version": "1.0.0",
    "main": "index.js",
    "license": "MIT",
    "scripts": {
        "start": "nodemon server.js"
    },
    "dependencies": {
        "cors": "^2.8.5",
        "dotenv": "^10.0.0",
        "express": "^4.17.1",
        "serve": "^12.0.1",
        "stripe": "^8.178.0"
    }
}

And this is the Server.js (the main config of Express)

const express = require('express');
const cors = require('cors');

const dotenv = require('dotenv');

dotenv.config();

const app = express();

app.use(express.json());
app.use(
    express.urlencoded({
        extended: true,
    })
);

app.use(cors());

const configureRoutes = require('./routes');

configureRoutes(app);
const port = process.env.PORT || 9090;
const server = app.listen(port, (error) => {
    if (error) {
        console.log('Error running Express');
    }
    console.log('Server is running on port', server.address().port);
});

Am I missing something? Why can't I access the link if everything seems running fine? (locally there's no prob of course - so it has to be something during build)

about 4 years ago · Juan Pablo Isaza
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