aldebarandeprecated

simple key/value store built on Amazon S3

Usage no npm install needed!

<script type="module">
  import aldebaran from 'https://cdn.skypack.dev/aldebaran';
</script>

README

aldebaran

Simple key/value store built on Amazon S3

Overview

This is a key/value store wrapper around Amazon S3's APIs. I mean S3 is supposed to be some kind of key/value store but is mainly geared towards files. This is supposed to be a potential replacement for Redis, Memcached, et al, but with some advantages and some important caveats.

Usage

Firstly install using npm or yarn:

$ npm install --save aldebaran

Constructor

const Aldebaran = require('aldebaran')
const db = new Aldebaran('an-s3-bucket/some-db-name')

.connect() => Promise()

.put(key, field, value, [metadata]) => Promise()

value can either be a Buffer, object, string or a number.

.get(key, field) => Promise(result)

.getMetadata(key, field) => Promise({})

result

{
  metadata: {},
  body: Buffer || {} || "string" || 3.14
}

.delete(key, field)

.all(key, [prefix])

Will return an array of field's.