Trying to make a GET request across the private network (CONNECT ECONNREFUSED 127.0.0.1:44300)

Hello guys, a beginner here.

The current architecture of my app is a website based on my PC, and a web api server on my laptop. I need some data from a file on my laptop, and I have done an api that inserts the data from the file into a db, and then from my pc I am trying to access via an api that data from db.

The problem I am running into is the connect ECONNREFUSED 127.0.0.1:44300, which I have seen many posts regarding it, with the loopback problem.

If i run the same get call on my laptop, it works, but if I try from my PC, i get that error.

I have ensured the port is alright and the url is, as it works from my laptop. Any suggestions here? Sorry if I explained poorly, but I am not that familiarised with this topic. Thank you!

Are you trying to access from your PC to your laptop. Did I understand correctly?

Yes, the web api is running on my laptop, and I am trying to access it from my PC.

Because address 127.0.0.1 (if configuration wasn’t setup differently) foremost cases will refer to local machine, ie:
browser@laptop β†’ 127.0.0.1 β†’ http-server@laptop
browser@PC β†’ 12.0.0.1 β†’ http-server@PC

Oh, that makes sense. So if I understand correctly, I can’t have two http servers on the same localhost because of the loopback?

You have to refer to local network ip of your laptop, from your PC. And your laptop needs to have open port for access (port on which server or service your trying to connect, listens).