Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analytics page showing LINE and web traffic of selected messages #18

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from
Draft
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,19 @@ Other scripts include:
- `npm run typecheck`: Checks Typescript types
- `npm run codegen`: After changing GraphQL query, run this to update Typescript types

Lint and check is also invoked in Travis.
Lint and check is also invoked in Github actions.

### Connecting to production API instead of staging

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:

1. Add `"proxy": "https://api.cofacts.tw"` to package.json
2. Change `REACT_APP_API_URL` to `http://localhost:3000/` in `.env.local`


## Deployment

In `.travis.yml` we have configured an automatic deploy to `gh-pages` branch.
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](https://docs.travis-ci.com/user/deployment/pages/)
to setup `GITHUB_TOKEN` environment variable in your Travis project.
If you want to maintain a fork and deploy to your own `gh-pages`, follow [these steps](https://github.com/peaceiris/actions-gh-pages)
to setup `GITHUB_TOKEN` environment variable in your Github repository.
252 changes: 252 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
"@types/node": "^16.18.4",
"@types/react": "^18.0.26",
"@types/react-dom": "^18.0.9",
"d3-array": "^3.2.2",
"d3-scale": "^4.0.2",
"d3-shape": "^3.2.0",
"graphql": "^16.6.0",
"immer": "^9.0.18",
"react": "^18.2.0",
Expand Down Expand Up @@ -99,12 +102,16 @@
"@graphql-codegen/typescript": "^2.8.3",
"@graphql-codegen/typescript-operations": "^2.5.8",
"@graphql-codegen/typescript-react-apollo": "^3.3.7",
"@types/d3-array": "^3.0.4",
"@types/d3-scale": "^4.0.3",
"@types/d3-shape": "^3.1.1",
"@typescript-eslint/eslint-plugin": "^5.45.0",
"@typescript-eslint/parser": "^5.45.0",
"eslint-config-prettier": "^8.5.0",
"eslint-import-resolver-typescript": "^3.5.2",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-prettier": "^4.2.1",
"prettier": "^2.8.0"
}
},
"proxy": "https://api.cofacts.tw"
}
Loading
Loading