In express.js app.use(cors) changed to app.user(cors());