Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

186
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda