const cors = require("cors"); app.options("*", cors({ origin: 'http://localhost:8000', optionsSuccessStatus: 200 })); app.use(cors({ origin: "http://localhost:8000", optionsSuccessStatus: 200 }));