This app is created to work with Commit Zero. You'll need to run the zero application against a zero.yml file to generate the code.
zero -config <config file> <source directory> <destination directory>See example.yml for the full example.
---
name: example-commit-zero-frontend
# params are key value pairs passed into templates
params:
# Application config
# production host name
productionHost: fe-test.commitzero.com
productionBucket: fe-test.commitzero.com
# staging host name
stagingHost: fe-test.commitzero.com
stagingBucket: fe-test.commitzero.com
Once you've templated this out, you can remove the above section from this README as it's no longer needed.
This project was bootstrapped with Create React App.
See full documentation here
yarnyarn startyarn testTo run the backend app locally all you need to do is build the container and run it alongside your app.
The corresponding backend for this app is zero-deployable-backend
git clone [email protected]:commitdev/zero-deployable-backend.gitBuild the docker image locally and run it. We need to set a Pod name so that the frontend can display that data.
docker build . -t zero-deployable-backend
docker run -p 8080:8080 -e SERVER_PORT=8080 -e POD_NAME="Fake POD name." zero-deployable-backendThese are set by REACT_APP_CONFIG enviroment variable at build time. This corresponds to a json file in the config directory.
For example to build the staging site and host it you would use:
REACT_APP_CONFIG=staging yarn build
serve -s build