The first step to move some of the most environment-specific configuration options to environment variables.
Like in ICAT+, moving to environment variables for some options (not all) has many advantages:
- Each environment can have its own configuration (until now,
icatPlus.example.jswas the production configuration).
- Default values for every environment (dev/test/prod) appear directly in the version-controlled source code, which is good for discoverability and for developer induction (i.e. new devs have a set-up that works out of the box).
- Default environment values can easily be overridden in
.env.*localfiles without impacting other developers, since these files are not overriden.
- A developer's configuration doesn't get overridden when running
npm run build, so it is now easier to build the app with development variables for testing purposes.