2024-05-20 13:01:49 +02:00
|
|
|
**Waki** stands for **Wak**aTime **I**ntegration Proxy. It is a simple proxy server that forwards requests to multiple WakaTime instances.
|
|
|
|
|
|
|
|
Runs fully on [Cloudflare Workers](https://workers.cloudflare.com/).
|
|
|
|
|
|
|
|
## Requirements
|
|
|
|
|
2024-08-05 22:38:41 +02:00
|
|
|
- [bun](https://bun.sh)
|
2024-05-20 13:01:49 +02:00
|
|
|
- [cloudflare account](https://cloudflare.com)
|
|
|
|
|
|
|
|
## How to setup
|
|
|
|
|
|
|
|
After cloning the repository and installing the dependencies, you need to run the following command to deploy the worker:
|
|
|
|
|
|
|
|
```bash
|
2024-08-05 22:38:41 +02:00
|
|
|
bun run deploy
|
2024-05-20 13:01:49 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
Then, you need to set the following environment variables in your Cloudflare account:
|
|
|
|
|
2024-05-20 13:14:36 +02:00
|
|
|
- `API_TOKEN` - random UUID v4 that will be used to authenticate requests
|
2024-05-20 13:01:49 +02:00
|
|
|
- `PROVIDERS` - list of WakaTime instances (in JSON format)
|
|
|
|
- `MAIN_PROVIDER` - main WakaTime instance which will be used to retrieve the user's data, etc...
|
|
|
|
|
|
|
|
Look at the `vars.example` file for more information.
|
|
|
|
|
|
|
|
You can set the environment variables using the Cloudflare dashboard or using the `wrangler` CLI.
|
|
|
|
|
|
|
|
```bash
|
|
|
|
wrangler secret put API_TOKEN
|
|
|
|
wrangler secret put PROVIDERS
|
|
|
|
wrangler secret put MAIN_PROVIDER
|
2024-08-05 22:38:41 +02:00
|
|
|
```
|