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

185
Vistas
endpoint don't work, doesn't return anything

¿can you help me to understand this?

If I have an endpoint in a specific route it will display in the browser the expected content, but with the same code just modifying the endpoint it doesn't return anything. The only change that I do is the route of the endpoint, the rest of code is the same in both cases.

¿Why this happen?

The code displays in the browser the content of a json file:

this way it doesn't work: It doesn't show an error, just don't return anything.

localhost:3000/v1/people/partner

 app.get("/v1/people/partner", (req, res) => {
        const peopleInVisual = PeopleController.getAllVisualPeople();
        res.json({ peopleInVisual });
});

In this way it works fine: notice I just have changed the hello at the endpoint

localhost:3000/v1/hello/partner

app.get("/v1/hello/partner", (req, res) => {
    const PeopleInVisual = PeopleController.getAllVisualPeople();
    res.json({ PeopleInVisual });
});

Thanks!

over 4 years ago · Santiago Trujillo
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