Hi guys I am using a typical react folder structure;
- React Blog
- public
- react-blog-end
- src
server.js
- src
...
Some background information: the src folder obviously runs on port 3000 (react convention). My server.js file is a node.js script. It runs on port 8000. The code is here:
const express = require('express');
const app = express();
app.get('/test', (req, res)=> {
res.send("Hello");
})
app.listen(8000, () => console.log("Listening on port 8000"));
It is extremely simple. I just got started to work on the back-end. When run the server.js script in the browser, it shows:
GEThttp://localhost:8000/test
[HTTP/1.1 404 Not Found 7ms]
Content Security Policy: The page’s settings blocked the loading of a resource at inline (“default-src”). injectGlobalHook.js:513:49
Content Security Policy: The page’s settings blocked the loading of a resource at http://localhost:8000/favicon.ico (“default-src”).
Does anyone knows what is the problem and how to solve it? Thanks!