My React app currently uses my local API when making an axios.get() call with the following url:

<http://localhost:3000/users>

Instead of hard-coding the url, I need my component to do a lookup against the config file that is currently configured for the current environment. For example, when my API is running on Azure the axios get call should use the following url:

<https://my-api.azurewebsites.net/users>

What is the proper way to lookup this config value in a React app? For example, should I create some type of config.js file? What is the proper import/code for my component to hook into the config file for lookup?