Skip to content

commitdev/zero-frontend-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Commit Zero

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 Command

zero -config <config file> <source directory> <destination directory>

Config File

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.


<% .Name %>

Create React App

This project was bootstrapped with Create React App.

See full documentation here

Commands

Install Dependencies

yarn

Run locally

yarn start

Run Tests

yarn test

Backend App

To run the backend app locally all you need to do is build the container and run it alongside your app.

Backend Repo

The corresponding backend for this app is zero-deployable-backend

git clone [email protected]:commitdev/zero-deployable-backend.git

Docker

Build 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-backend

Environment Configs

These 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

About

Frontend React example

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors