Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 3663

Vite React application backend can't access localhost:3000 server

$
0
0

I'm building a react application using Vite, and for the backend database I'm using MySQL but not with directly connection, I'm using Prisma to deal with my DB, and I'm using SRC architecture with RESTful API to deal with the Apis, My problem is whenever I'm trying to test the API's through postman it gives me Error: connect ECONNREFUSED 127.0.0.1:3000 It seems that when I run my Vite application, the localhost 3000 server doesn't start with it in vs code, how to fix this?

note: before a while I made a backend application using Restful API approach and test it using postman and everything was great so I know that I'm putting the right route in it, also I tried to connect with my DB and Prisma fetches the info successfully from my localhost DB and print it on console so it seems that it's not the problem.

Things I tried:

  • Changed 3000 port,
  • Changed user and password for my localhost DB
  • Tried another application routers in my POSTMAN and they work (not Vite)
  • add inbound rule for 3000 port in my network proxy settings
  • delete node modules

Viewing all articles
Browse latest Browse all 3663

Trending Articles