Skip to content
This repository was archived by the owner on Dec 18, 2021. It is now read-only.

Latest commit

 

History

History
23 lines (19 loc) · 468 Bytes

README.md

File metadata and controls

23 lines (19 loc) · 468 Bytes

key-mongo

Easy to use mongodb wrapper, keyvalue usage.

Installing

Yarn: yarn add key-mongo
Npm: npm install key-mongo

Example usage:

const { KeyMongo } = require('key-mongo');
const KeyClient = new KeyMongo({
    dbName: 'test',
    dbUrl: 'yOuR nIcE mOnGoDbUrL',
})
/** when already connected to database you can remove timeout */
setTimeout(() => {
    KeyClient.set('collection', 'user_1', { money: 20, premium: true } )
}, 3000)