last day (15 days later) » 

5:59 AM
0
A: Localhost stopped working for my node and react application

TheoNeUpKIDYou more than likely have zombie threads running in the background or at the same time. Kill all node threads and then serve it up again. NOTE make sure you clear you cache and make sure your navigating to http and not https

 
I forgot to add that to things I have tried. It did not work for me either.
 
make sure you are using http and not https
 
I am using http not https.
 
have you tried using another browser and seeing if there's a difference ?
 
I have tried using edge, firefox, and chrome
My frontend and backend are in separate folders but share the same parent if that is what you mean.
 
5:59 AM
what port is your backend running with
 
I am running on port :4000
 
ok, try 0.0.0.0:3000 instead of localhost
 
No luck when using that ip ):
 
Cant even ping with that IP @TheoNeUpKID (0.0.0.0)
 
I can ping localhost using ping -4 localhost
 
5:59 AM
Yes of course you can on localhost. But did you reboot and follow advice in comments? I never witnessed such a fast reboot if you have
 
try netstat -plant | grep 3000 then localhost should come up
 
If you dont want to reboot for whatever reason, then depending on your OS, you can check and see how many servers are running?
 
I rebooted earlier @GetSet
 
Earlier, but not after removing your redefine in the hosts file?
 
Not yet I will do that now, but @TheoNeUpKID netstat -plant | grep 3000 gave me a response.
 
5:59 AM
Patience will solve most bugs @RileyConrardy
 
well then, its probably a component not rendering correctly. Try linting and see if there's an exception sticking out.
 
user10780072
@RileyConrardy Can you please share below commands output to check how curl is behaving? curl -vvv localhost:3030 ; curl -vvv 192.168.150.13:3000
 
@amitdahiya curl gives me what I expect to receive, the correct html. But the browser does not. I assume that its some sort of browser issue then?
 
user10780072
Try to clear browser cache and use incognito mode. Also enable developer console in google chrome using F12 button (check network + console) requests. See if there is some kind of blocking by browser or some issue occuring.
 
@amitdahiya I dont see anything that stands out but the initial localhost request fails. I added a picture of the request to the question.
@amitdahiya after digging into it some more I found out that curl for localhost is working in wsl2 but not command prompt any idea why? I assume this is why the browser is not able to find localhost. Do I need to do some sort of ip mapping?
 

last day (15 days later) »