Home

Awesome

MongoDOWN

A drop-in replacement for LevelDOWN that runs on MongoDB. Can be used as a back-end for LevelUP rather than an actual LevelDB store.

Build Status

Installation

npm install mongodown

Example

var levelup = require('levelup')
var mongodown = require('mongodown')

// MongoDB Collection name defaults to 'mongodown'
var db = levelup(mongodown('localhost/my-database'))

// OR pass custom MongoDB collection name
db = levelup(mongodown('localhost/my-database'), { collection:'People_C' })

db.put('name', 'Yuri Irsenovich Kim')
db.put('dob', '16 February 1941')
db.put('spouse', 'Kim Young-sook')
db.put('occupation', 'Clown')

db.readStream()
  .on('data', console.log)
  .on('close', function () { console.log('Show\'s over folks!') })

Limitations

MongoDOWN does not support iterator snapshots

License

MIT