0.0.2 • Published 12 years ago

mongo-store v0.0.2

Weekly downloads
25
License
-
Repository
github
Last release
12 years ago

mongo-store build status

Session store backed by mongodb

Example

var mongoStore = require("mongo-store")
    , assert = require("assert")
    , mongoCol = require("mongo-col")

mongoCol("example-test-collection-mongo-store", function (collection) {
    var store = mongoStore(collection)
    store.set("foo", { "foo": "bar" }, function (err) {
        assert.equal(err, null)
        store.get("foo", function (err, value)  {
            assert.equal(err, null)
            assert.equal(value.foo, "bar")
            console.log("done")
        })
    })
})

Installation

npm install mongo-store

Tests

make test

Contributors

  • Raynos

MIT Licenced