Global Key-Value Store.beta

Get Started

gokv is a real-time network and storage solution that provides global, fast synchronization of data at the edge. It is designed for serverless and edge compute platforms, offering zero-latency access to data and ensuring that your apps are always up-to-date.

Installation

import gokv from "https://deno.land/x/gokv@0.0.23/mod.ts";

For Node.js users, you will require Node.js 16+:

npm install gokv
import gokv from "gokv";

or import the module via esm.sh in browsers:

import gokv from "https://esm.sh/gokv";

Setup

gokv works in Deno, Node.js and browsers. You need to setup the environment before using it.

Set Access Token

Please log in https://gokv.io to get the access token.

import gokv from "https://deno.land/x/gokv@0.0.23/mod.ts";

gokv.config({ token: "xxxxxx" });

or set the token in environment variable with name GOKV_TOKEN without calling the config method.

Configuration in Browsers

You need to implement the /sign-access-token API by yourself before use gokv in browsers, check out the Access Token.

import gokv from "https://esm.sh/gokv";

gokv.config({ signUrl: "/sign-access-token" });

Importing Web-Polyfill

gokv uses the standard web fetch, crypto and WebSocket API, you need to import the Web-Polyfill in Node.js v16 environment.

import "gokv/web-ployfill";

Examples

WIP