serve-handler icon indicating copy to clipboard operation
serve-handler copied to clipboard

support runtime environment variables

Open AndyOGo opened this issue 6 years ago • 0 comments

I want to serve a Create-React-App production build at different stages.

So I want to set all REACT_APP_ environment variables during runtime, not at build time.

In order to make this work I would like to utilize a tool similar to react-env, which creates a env.js file, which will hold all environment variables like:

window._env = { REACT_ENV_FOO: 'BAR' };

This can be archived by using a middleware

AndyOGo avatar Nov 27 '19 12:11 AndyOGo