Reputation: 2066
Building a react application that consumes a rest api.
Upvotes: 0
Views: 297
Reputation: 7344
How can we configure the rest api url based on the environment (local/dev/qa/prod)?
Hard to answer without more detail. This is more about configuring any variable based on the environment; your API endpoint is just example.
The rest API url might change every-time we deploy the application to AWS (Link gets generated in AWS API Gateway), Have we have to manually update the url list in the react app? Do we have a way to sync these urls among consumers?
prod.myendpoint.company.com
or myendpoint.company.com/prod
.Upvotes: 0