DEV Community

Discussion on: JavaScript CRUD Rest API using Nodejs, Express, Sequelize, Postgres, Docker and Docker Compose

 
edwardfernando profile image
Edward Fernando

in the index.js, i tried to commented out these lines and it is working now:

// app.use((req, res, next) => {
//     res.setHeader('Access-Control-Allow-Origin', '*');
//     res.setHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE');
// });
Enter fullscreen mode Exit fullscreen mode

I still don't understand what happened. Any pointers / explanation would be appreciated much.