Skip to content

ReductStore Client SDK for JavaScript

npm npm GitHub Workflow Status

The ReductStore Client SDK for JavaScript is an asynchronous HTTP client for interacting with a ReductStore instance from a JavaScript application. It is written in TypeScript and provides a set of APIs for accessing and manipulating data stored in ReductStore.


  • Promise-based API for easy asynchronous programming
  • Support for ReductStore HTTP API v1.10
  • Token-based authentication for secure access to the database
  • Labeling for read-write operations and querying
  • Batch operations for efficient data processing

Getting Started

To get started with the ReductStore Client SDK for JavaScript, you'll need to have ReductStore installed and running on your machine. You can find instructions for installing ReductStore here.

Once you have ReductStore up and running, you can install the ReductStore Client SDK for JavaScript using npm:

npm i reduct-js

Then, you can use the following example code to start interacting with your ReductStore database from your JavaScript application:

const { Client } = require("reduct-js");

const client = new Client("");

const main = async () => {
  // Get or create a bucket in the database
  const bucket = await client.getOrCreateBucket("bucket");

  // Write a record to the bucket
  const timestamp = * 1000;
  let record = await bucket.beginWrite("entry-1", timestamp);
  await record.write("Hello, World!");

  // Read the record back from the bucket
  record = await bucket.beginRead("entry-1", timestamp);

  .then(() => console.log("done"))
  .catch((err) => console.error("oops: ", err));

For more examples, see the Quick Start.