Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

83 lines (55 sloc) 1.604 kb

Inspired by meteor


  • I wanted a decoupled library with the same level of functionality provided in meteor
  • Cached on the client-side, and server-side. Less hits to mongodb itself.
  • Allows for users to be sandboxed in their own collection (authentication).
  • listening to cursors for any change


  • fork mongoose ODM and use this as the default driver
  • REST interface mapper
  • sync items to backend (persistence api)
  • rest gateway example
  • DNode driver
  • Http driver
  • object modifiers: $inc, $set, $unset, $push $pushAll, $addToSet, $pop, $pull, $pullAll, $rename, $bit (should be separate repo - fiddle?)
  • cursor.emit("update") when limit, selector, or skip have changed


Here's a simple example using the memory driver:

var mdblite = require('mongodblite'),
db = mdblite.db(new mdblite.drivers.Memory());

var people = db.collection('people');

//add some data
        name: "Craig",
        age: 22
        name: "Tim",
        age: 21
        name: "John",
        age: 20

//create a filter against the "people" collection
var peopleOlderThan21 = people.find({age:{$gt:21}}).limit(20);

peopleOlderThan21.observe(function(observer) {

    //the filtered items - max = 20

    observer.on("insert", function(items) {
        //craig - source is also updated

    //called when something big changes, such as limit, or skip
    observer.on("reset", function() {



//insert a new user, triggers listener above
    name: "Sarah",
    age: 22

Jump to Line
Something went wrong with that request. Please try again.