I am trying to use fetch in an react-create-app server(localhost:3000) to get a static .json file from my apache(localhost:80) but it returns source of my react index.html file!
Specifying port number results in "networking error"
const that=this;
fetch("localhost/myapp/data/structure.json").then((res)=> {return res.text()})
.then(((data)=>{that.setState({structure: data})})).catch((e)=>{alert(e.toString())});