@did-connect/storage-nedb
TypeScript icon, indicating that this package has built-in type declarations

2.2.4 • Public • Published

styled with prettier

Introduction

DID Connect session storage engine that uses nedb to store data, implements interfaces defined in @did-connect/storage.

Install

npm install @did-connect/storage-nedb
// or
yarn add @did-connect/storage-nedb

Usage

const { NedbStorage } = require('@did-connect/storage-nedb');

const storage = new NedbStorage({
  dbPath: '/path/to/db',
});

// Listen on events of the storage
storage.on('create', (d) => console.log('create', d));
storage.on('update', (d) => console.log('update', d));
storage.on('destroy', (d) => console.log('destroy', d));

(async () => {
  const sessionId = '123456';
  const item = await storage.create(sessionId);
})();

Readme

Keywords

Package Sidebar

Install

npm i @did-connect/storage-nedb

Weekly Downloads

82

Version

2.2.4

License

Apache-2.0

Unpacked Size

11.1 kB

Total Files

6

Last publish

Collaborators

  • wangshijun