NODE 2 explaining the fetch.
//For this error
"error:0308010C:digital envelope routines::unsupported"
//Update it to the latest
npm i react-scripts@latest//The CORS config handles it automatically
app.all('*', function(req, res, next) {
res.header('Access-Control-Allow-Origin','URLs to trust of allow');
res.header('Access-Control-Allow-Methods','GET, POST, OPTIONS, PUT, PATCH,DELETE');
res.header('Access-Control-Allow-Headers','Content-Type');
if ('OPTIONS' == req.method) {
res.sendStatus(200);
} else {
next();
}
});Deploying a full-stack app on the web



Private data on .env files

Last updated