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

272
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
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