-1

The connection was rejected. Either the requested service isn’t running on the requested server/port, the proxy settings in vscode are misconfigured, or a firewall is blocking requests. Details: RequestError: connect ECONNREFUSED 127.0.0.1:3001.

heres my code

GET http://localhost:3001/books HTTP/1.1 Content-Type: application/json

POST http://localhost:3001/books HTTP/1.1 Content-Type: application/json

{ "title": "Harry Potter" }

JPVA
  • 1

1 Answers1

-1

a detailed description and preferably a code snippet of your backend config would be helpful in assisting me(and other potential respondents to help you resolve the issue accurately). Here is a potential reason, your backend service might not be connected to your server (the output on the vs code terminal should guide you on the same). Here is what you can try to do; a) Ensure that your server is running b) Ensure that all the values required to establish a connection (username, password, e.t.c) are correct c) If you are using microservice architecture ensure that all the individual microservices are connected to the server

I hope that resolves your issue.

Happy coding!

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 26 '23 at 08:48