The current soultion requires changing a line of code each time you want to switch it. We should have a .env config or something similar to set react environment variables when switching between dev and build. It might require installing additional dependencies (E.g. webpack or dotenv)
Due to CORS I suggest we also add environment variables to the backend. In order for the backend to accept requests from the frontend, the frontend url needs to be set in the code (here)
I will take a look at some potential solutions to this.
The current soultion requires changing a line of code each time you want to switch it. We should have a .env config or something similar to set react environment variables when switching between dev and build. It might require installing additional dependencies (E.g. webpack or dotenv)
This article describes a couple ways of doing it: https://trekinbami.medium.com/using-environment-variables-in-react-6b0a99d83cf5