Sample React.js project demonstrating configuring runtime configuration for a Node.js web application. The application is built and packaged using Docker through a Makefile, and the runtime values are decided based on the DEPLOYMENT_ENV environment variable. The env-config.js holds the used runtime configuration and the env-config.sh script is used to create the correct values based on the DEPLOYMWENT_ENV.
- Docker
- Node.js
In the project directory, you can run: DEPLOYMENT_ENV, by default, will be dev.
- Builds the Docker image
- Runs the Docker container
Open http://localhost to view it in the browser.
Now run the following to switch to prod:
