Skip to content

Latest commit

 

History

History
45 lines (31 loc) · 1.01 KB

README.md

File metadata and controls

45 lines (31 loc) · 1.01 KB

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