I am using React and Node on Google App Engine (flexible environment) .
I would like to be able to change the configuration of my application based on environment setting: Production vs Development.
In Development I have the following setup: I run my react app in the browser using localhost:5050 and run node app on my localhost:8080 in package.json I use Proxy: "proxy": "http://localhost:8080" API requests use local URLs: "localhost:8080/something"
In Production I have the following setup: no need for proxy; API URLs are: "https://www.example.com/something"
How can I make sure that when I start the apps in localhost, my API requests will use the local domain and that the proxy will be used ? is there a way to configure it via package.json or via some other option ?