I was able to connect to my server and use a get a request to display some text. However, when I restarted my server after taking a break, I was hit with this error
Content Security Policy: The page’s settings blocked the loading of a resource at http://localhost:8080/favicon.ico (“default-src”).
If anyone can please point me in the right direction, that would be great.
If it helps, I am using the latest version of Firefox.
Edit: I changed the port. I can now see my get request, however, I'm still getting the error
const express = require ('express');
const cors = require('cors');
const app = express();
app.use(cors());
const port = 3001;
// was 8080
app.listen(port, () => {
console.log(`Server is up and listening on port ${port}`);
})
app.get('/', (req, res) => {
res.send({
express: 'Your express backend is connected to react'
})
})