How to allow CORS request with Node Express
Published: March 31, 2019
This happens because of security reasons, browsers restrict cross-origin HTTP requests initiated from within scripts.
There is an easy fix for this. Open your project in the terminal.
npm i cors –save
const cors = require('cors') app.use(cors())
This has enabled CORS for all requests on your node express server. You can now refresh your client-side page.