1. What is CORS and why is it required?

CORS (Cross-Origin Resource Sharing) is a browser security mechanism that allows/restricts APIs from being accessed by another domain.

Example:

Frontend: http://localhost:3000

Backend API: http://localhost:8080