mongo-down

0.0.1 • Public • Published

Mongo-Down

A replacement for LevelDOWN that works using a MongoDB Database. Can be used as a back-end for LevelUP rather than an actual LevelDB store.

See Also

Sample Usage

var mongoURL = "<mongo db url>";
var collectionName = "<name of collection>||'collection'";
var levelup = require('levelup');
var db = levelup("what/ev/er",
    {
        db: require('mongodown')(mongoURL, collectionName)
    }
)
db.put('foo', 'bar', function (err) {
  if (err) throw err
  db.get('foo', function (err, value) {
    if (err) throw err
    console.log('Got foo =', value)
  })
})

Package Sidebar

Install

npm i mongo-down

Weekly Downloads

1

Version

0.0.1

License

MIT

Last publish

Collaborators

  • johnhenry