https://github.com/chmac/react-hasura-typescript-stack
https://github.com/chmac/react-hasura-typescript-stack
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/chmac/react-hasura-typescript-stack
- Owner: chmac
- License: mit
- Created: 2019-12-25T13:15:23.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-02-18T17:43:03.000Z (over 4 years ago)
- Last Synced: 2025-04-02T12:49:58.513Z (about 1 year ago)
- Language: TypeScript
- Size: 3.93 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
react-hasura-typescript-stack
---
Last update: Dec 2019
A skeleton hasura / react setup.
Includes
* typescript
* apollo client
* material UI
## Folders & commands
First, run `yarn` in both the `hasura/` and `frontend/` directories.
* `hasura/`
- `yarn run hasura` - Start the hasura docker setup
- `yarn start` - Start the hasura console
* `frontend/`
- `yarn start` - Standard create-react-app app start
## Config
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 the `env-cmd` package which is included in both `package.json` files both as a devDependency and in the `scripts` part.
* `hasura/.env` - This is read automatically by `docker-compose` in addition to the root `.env` file which is passed in via `env-cmd`.
* `frontend/.env` - This is ready automatically by `create-react-app` in addition to the root `.env/` file which is passed in via `env-cmd`.
- This supports `env-expand` which means variables in the root `.env` can be made available to the react build like:
- `REACT_APP_BAR=$FOO`
## Setup
To get started, you need to make the following changes:
- Register an [Auth0](https://auth0.com) account
- Create an app for it
- Copy the domain and client id into the root `.env`