Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

267
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!