- Database Support: Mongodb
- Flexibilty: Can be used with any Node.js App and any kind of Node.js Framework
args
[Object] argsargs.db
[Array] Mongodb DB instance if not provided it will take default mongodb uri 'mongodb://127.0.0.1:27017/jgdb' (optional, defaultnull
)
Check examples/ directory and simply run any example using node example1.js
npm install @jeoga/option
yarn add @jeoga/opttion
const _Option = require('@jeoga/option');
let Option = new Option({
db: <Mongo DB Instance>
})
Option.init()
Note: Check examples how to pass Mongo DB Instance
Option.get('key', defaultValue=null)
Returns [Promise]<[string]>
Option.update('key', value)
Returns [Promise]<[Boolean]>
Option.add('key', value)
Returns [Promise]<[object]> if Error returns Returns [Promise]<[Boolean]>
Option.remove('key')
Returns [Promise]<[Boolean]>