Cloudflare Worker KV Proxy
This project is implemented to use Cloudflare KV in non-worker environment.
Setup KV and Proxy
- Copy whole content of
worker/kv_proxy.jsto create a new Cloudflare Worker using your browser, and clickSave and Deploy. - Create a new KV namespace.
- Go to your worker(the worker you just created) settings, and:
- Add KV binding.
- Add environment variable
KEY, the value will be your access token(please make it long enough).
Usage
let data = Demo ;
let client = new.unwrap;
println!;
println!;
println!;
println!;
Cache
To avoid unnecessary requests to Cloudflare, the proxy caches the response.
By default the caching is enabled. You can set default-features = false in Cargo.toml.