// cors install npm install cors const cors = require('cors'); app.use(cors()); // if you want to use every domain const corsOption = { origin: ['http://localhost:3000'], }; app.use(cors(corsOption)); // if you want to use in specific domain