1.0.5 • Published 2 years ago

@supernova350/mongoexpress v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

mongoexpress

DeepScan grade npm shield

Key-value MongoDB store written in TypeScript.

Importing

ESM (TypeScript)

import { MongoExpress } from '@supernova350/mongoexpress';

CommonJS (JavaScript)

const { MongoExpress } = require('@supernova350/mongoexpress');

Example Usage

// initialize a MongoExpress instance
const mongoexpress = new MongoExpress({ connectionString: '' });

// log 'ready' when connected
mongoexpress.on('ready', () => console.log('[mongoexpress] connected'));

// connect to database
await mongoexpress.connect();

// set value of key 'x' to 5
await mongoexpress.set('x', 5);
// get value of key 'x' and log
console.log(await mongoexpress.get('x')); // => 5
1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago