after uploading express app to heroku when calling that API in local frontend . I am getting CORS error
Hello Bappaditya,
You need to add CORS middleware to fix this issue. Check out the guide to add middleware in express applications here:-
https://expressjs.com/en/resources/middleware/cors.html
Also try to understand what is Cross-Origin Request from this article when you get time:-
Let me know if there are any other doubts/issue while using the middleware.
CORS already added
used cors
Are you able to access the API in Postman?
And did you redeploy the application after adding cors?
it is ok sir errors are resolved