Skip to content
This repository was archived by the owner on Mar 16, 2022. It is now read-only.
adamfowleruk edited this page Dec 28, 2012 · 36 revisions

Welcome to the mldb wiki!

Installation

npm install mldb

Basic use to save a document, then fetch it again:-

  var mldb = require("mldb");
  var db = new mldb(); // default options
  db.save({from: "test", to: "all", body: "wibble"},"/messages/1", {collection: "messages"},function(result) {
    // now fetch it
    db.get("/messages/1", function(result) {
      // now print it
      console.log("Doc content: " + JSON.stringify(result.doc));
      // now delete it
      db.delete("/messages/1", function(result) {
        console.log("Doc deleted");
      });
    });
  });
};

Anything else required, please add an issue to the tracker.

Clone this wiki locally