I followed the instructions and chrome can hit: http://127.0.01:8080 but I cannot hit it from javascript that created the server.
start(); // this creates the server which serves up data to chrome ;
// the next line -- I try to see if I can get any data from it -- it always errors :
setInterval(() => {
fetch("http://127.0.0.1:8080")
.then((response) => {
console.log("fetch appeared to succeed");
return response.text(); // not json()
})
.then((data) => console.log(data))
.catch((err) => {
console.log("there was an error", err);
});
}, 10 * 1000);
Is there any way to hit the webserver from the code that creates the webserver? I am trying to make a CORS-PROXY
I followed the instructions and chrome can hit: http://127.0.01:8080 but I cannot hit it from javascript that created the server.
Is there any way to hit the webserver from the code that creates the webserver? I am trying to make a CORS-PROXY