Skip to content
Session store backed by mongodb
JavaScript
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
examples
test
.gitignore
.npmignore
.travis.yml
LICENCE
Makefile
README.md
index.js
package.json
testem.json

README.md

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

Something went wrong with that request. Please try again.