TypeError: Failed to fetch
//The Problem is caused by Cross-origin (CORS)
//make sure you allow the origin you want your app to connect with:
Access-Control-Allow-Origin = "domain.com"
//or to allow all
Access-Control-Allow-Origin = "*"
//node js
app.use(function(req, res, next) {
res.header("Access-Control-Allow-Origin", "*");
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
next();
});