The readme of the react redux realworld.io application at https://github.com/gothinkster/react-redux-realworld-example-app says to edit the src/agent.js
to change t
Take a look at Immutable Web Apps!
It is a methodology that creates a separation of concern between index.html
and all other static assets:
index.html
as a deployment manifest that contains all environment-specific values.This is similar to the accepted answer, by including the environment variables directly in the index.html
window.env={'API_ROOT':'https://conduit.productionready.io/api'}
It also requires that the reference to other static assets are unique and versioned.
It honors both the "build, release, run" and "config" principles of 12factor.
A great benefit of this approach is that it enables atomic live releases by simply publishing index.html
.