Last update: Dec 2019
A skeleton hasura / react setup.
Includes
- typescript
- apollo client
- material UI
First, run yarn in both the hasura/ and frontend/ directories.
hasura/yarn run hasura- Start the hasura docker setupyarn start- Start the hasura console
frontend/yarn start- Standard create-react-app app start
Config values are set in .env files. Several are in the repo.
.env- This is the root config, and is passed to both hasura and frontend via theenv-cmdpackage which is included in bothpackage.jsonfiles both as a devDependency and in thescriptspart.hasura/.env- This is read automatically bydocker-composein addition to the root.envfile which is passed in viaenv-cmd.frontend/.env- This is ready automatically bycreate-react-appin addition to the root.env/file which is passed in viaenv-cmd.- This supports
env-expandwhich means variables in the root.envcan be made available to the react build like:REACT_APP_BAR=$FOO
- This supports
To get started, you need to make the following changes:
- Register an Auth0 account
- Create an app for it
- Copy the domain and client id into the root
.env