Menu
this is one of the things ive tried but it doesnt work. I do get redirected if going straight to the /test in the url(localhost:3001/test) and if sending a json object from express instead of the redirect, then I do get the JSON object to the react app so nothing is wrong with the connection between them.
Please can you help me make it work?
[CODE]
// express on port 3001
router.get(‘/test’, (req, res) => {
res.redirect(‘/login’)
});
// react on port 3000
fetch(‘/test’)