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

270
Vistas
Cannot GET an Express Route

I am working with ExpressJS route and everything works not until I added a route in which I get the error message,

Cannot GET /api/users/abc

using Postman.

Below are images that describe the challenge right now.

From my server.js file

enter image description here

To my userRoutes.js file

enter image description here

Every route works fine but /user_stats route doesn't. My approach to debugging the problem is to create an /abc route but to no avail, I got this HTTP response from Postman

enter image description here

Now the question, what might have gone wrong in my code?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

It seems after adding the route you haven't started the server. So, to make sure every time you made any changes to the files get reflected in the server build, you should install nodemon and make it run.

npm install --save-dev nodemon // only for dev

To run :

nodemon [your node app]

For more details check this, how you can configure your server to run the build files.

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