npm i cors
const cors = require("cors");
app.use(cors());
Cross-Origin Resource Sharing (CORS) is a browser security feature that allows client web applications to interact with resources in a different domain. CORS is an HTTP-header-based protocol that allows a server to specify which origins can access its resources.