key-mongo
v1.1.4
Published
A easy to use mongodb wrapper, key value usage
Downloads
14
Maintainers
Readme
key-mongo
Easy to use mongodb wrapper just like Map()
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',
collectionName: 'currency'
})
/** when already connected to database you can remove timeout */
setTimeout(() => {
KeyClient.set('user_1', { money: 20, premium: true } )
}, 3000)