Skip to content

GitHub Gist as KV, for Cloudflare Workers. It helps to keep the number of KV write operation as low as possible.

License

Notifications You must be signed in to change notification settings

JacobLinCool/worker-gist

Repository files navigation

Worker Gist

GitHub Gist as KV, for Cloudflare Workers.

It is slower than KV, but it helps to keep the number of KV write operation as low as possible.

Usage

import { GistStore } from "worker-gist";

const store = new GistStore(env.KV, env.PAT);

const logs = JSON.parse((await store.get("logs")) || "[]");

logs.push({ time: Date.now(), msg: "Something to log." });

await store.set("logs", JSON.stringify(logs));

About

GitHub Gist as KV, for Cloudflare Workers. It helps to keep the number of KV write operation as low as possible.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages