//install package => npm i cors const cors = require('cors'); const app = express() app.use(cors()); // use this cors in middleware and done