Skip to content

Latest commit

 

History

History
51 lines (33 loc) · 993 Bytes

README.md

File metadata and controls

51 lines (33 loc) · 993 Bytes

Connect Medea

connect-medea is a Connect session store backed by Medea, a persistent, embedded key-value store. This implementation is based on connect-redis.

Installation

$ npm install connect-medea

Options

  • dirname: The directory to use for Medea's key-value storage.

Usage

For Connect:

var connect = require('connect');
var MedeaStore = require('connect-medea')(connect);

var options = {
  dirname: __dirname + '/data'
};

var store = new MedeaStore(options);

connect()
  .use(connect.session({ store: store, secret: 'el chupacabra' }));

For Express:

var express = require('express');
var MedeaStore = require('connect-medea')(express);

var options = {
  dirname: __dirname + '/data'
};

var store = new MedeaStore(options);

var app = express();
app.use(express.session({ store: store, secret: 'el chupacabra' }));

License

MIT