Tools that help community building.
Discussion: https://g0v.hackmd.io/@mrorz/B1X4EkJcU#New-idea-Social-media-toolkit
# Install dependency, initialize .env file for development
$ npm install
$ cp .env.sample .env.local
# Start dev server
$ npm start
Other scripts include:
npm run lint
: Runs eslintnpm run lint:fix
: Runs eslint and handle fixable errorsnpm run typecheck
: Checks Typescript typesnpm run codegen
: After changing GraphQL query, run this to update Typescript types
Lint and check is also invoked in Github actions.
If you want to connect to production API server during development, you can follow these steps to route all API requests to production API server:
- Add
"proxy": "https://api.cofacts.tw"
to package.json - Change
REACT_APP_API_URL
tohttp://localhost:3000/
in.env.local
In .github/workflows/build-and-deploy.yml
we have configured an automatic deploy to gh-pages
branch.
If you want to maintain a fork and deploy to your own gh-pages
, follow these steps
to setup GITHUB_TOKEN
environment variable in your Github repository.