Im trying to access my Node/Express Server using a fetch/axios GET request on React
This IP is the Private IP to the server so it has been Xed out
axios.get('http://172.xx.xx.xxx:5000/api')
.catch(function (error) {
console.log(error);
})
This is Express Code
const express = require('express');
const cors = require('cors');
const app = express();
app.use(cors({origin: true, credentials: true}));
const port = 5000;
app.listen(port, () => `Server running on port ${port}`);
app.get('/api', cors(), (req, res) => {
console.log("HELLO")
})
I get a Error: Network Error
Im assuming this is a secuirty policy on AWS EC2
However When i do a curl 172.xx.xxx.xxx:5000/api
My Node server then prints out Hello, so it is accesible but not via the front end react. (This is curled on the same server running both Express/React
This is my Inbound rules, i havent touched any VPC stuff not sure if i need to I enabled all ports just to check (not be the case in production)
I also do not have a firewall running on my server (nothing appeared when ufw status command was ran)
Where I am i going wrong for me to make a Request from React to Express
Thanks in Advance
EDIT ADDED DEVELOPER TOOL SCREENSHOT

