What is the use of CORS in Node JS?
CORS is a Node.js package used for providing a Connect/Express middleware.
BY Best Interview Question ON 29 Jun 2020
Example
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();
});