CORS

What is CORS ?

Installation

npm install cors

app.js

add this code below const app

const app = express();
var cors = require('cors')

AND app.use() above routing

// setting express function
app.use(cors());

//routing
const home = require('./routes/homes');

Last updated

Was this helpful?