From d881696a84a9efe0dee166c5095a07d73e470d42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jozef=20Steinh=C3=BCbl?= Date: Mon, 20 May 2024 13:01:49 +0200 Subject: [PATCH] docs: readme --- README.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..e3529c3 --- /dev/null +++ b/README.md @@ -0,0 +1,33 @@ +**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 + +- [node.js](https://nodejs.org/) +- [pnpm](https://pnpm.js.org/) +- [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 +pnpm run deploy +``` + +Then, you need to set the following environment variables in your Cloudflare account: + +- `API_TOKEN` - randomly generated token that will be used to authenticate requests +- `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 +``` \ No newline at end of file