In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
In the project directory, you can run:
Install the required packages
This avoids CORS issues and error messages like this in development:
Fetch API cannot load http://localhost:9080/api/... No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:3000' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.
Some resources to understand this implementation:
- https://medium.com/bb-tutorials-and-thoughts/react-how-to-proxy-to-backend-server-5588a9e0347
- https://create-react-app.dev/docs/proxying-api-requests-in-development/