JSPM

  • Created
  • Published
  • Downloads 931
  • Score
    100M100P100Q98853F
  • License MIT

Reduct Storage Client SDK for Javascript/NodeJS/Typescript

Package Exports

  • reduct-js
  • reduct-js/lib/cjs/index.js
  • reduct-js/lib/esm/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (reduct-js) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Reduct Storage Client SDK for JavaScript

GitHub release (latest SemVer) npm GitHub Workflow Status

Asynchronous HTTP client for Reduct Storage written in TypeScript.

Features

  • Promise based
  • Support Reduct Storage API v0.5
  • Token authentication

Getting Started

Read here, how to run Reduct Storage. Then install the package:

npm i reduct-js

And run this example:

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

const main = async () => {
  const client = new Client("https://play.reduct-storage.dev");

  const bucket = await client.getOrCreateBucket("bucket");

  const timestamp = Date.now() * 1000;
  await bucket.write("entry-1", "Hello, World!", timestamp);
  console.log(await bucket.read("entry-1", timestamp));
};

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