1.1.0 • Published 4 years ago

daclusta v1.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

daclusta

Build Status David DM GitHub code size in bytes GitHub package.json version GitHub

An in memory/file based database that can run on multiple threads.

Installation

npm i --save daclusta

Usage

const db = require('daclusta').promises

async function example () {
  const connection = await db.connect('./db.json');

  const insertedRecord = await db.post(connection, {
    firstName: 'Joe',
    lastName: 'Bloggs
  });

  const readRecord = await db.get(connection, insertedRecord.meta.id);

  await db.close(connection);

  // readRecord.doc === { example: 1 }
}

example()

API

License

This project is licensed under the terms of the AGPL-3.0 license.