Hello, I am trying to fetch some data from my local API but I have some issues with cors, can anyone help me?
useEffect(()=>{
fetch("http://localhost:3001/api").then(res=>res.json()).then(res=>console.log(res))
},[])
UPDATE:
I solved this issue in the meanwhile by installing 'cors'
package in my node app and using app.use(cors())