kyoto-tycoon session store for connect
JavaScript
Switch branches/tags
Latest commit 6dd68e4 Mar 10, 2012 @kazupon Release 0.1.2
Permalink
Failed to load latest commit information.
lib Fixed the session bug. Oct 3, 2011
test Fixed the session bug. Oct 3, 2011
.gitignore commit first. Sep 18, 2011
HISTORY.md Fixed connect version. Mar 10, 2012
LICENSE commit first. Sep 18, 2011
README.md Release 0.1.0. Sep 20, 2011
example.js
ktserver_invoker.js Implemented 'length' & 'clear' methods. Sep 20, 2011
package.json Release 0.1.2 Mar 10, 2012

README.md

connect-kyoto

connect-kyoto is a kyoto-tycoon session store.

Requirements

Installation

$ npm install connect-kyoto

Options

  • port : kyoto-tycoon port number
  • host : kyoto-tycoon hostname

Usage

connect

var KyotoStore = require('connect-kyoto').KyotoStore;
...
connect(
  ...
  connect.cookieParser(),
  connect.session({
    secret: 'youre secret here',
    cookie: {
      maxAge: 7 * 24 * 60 * 60 * 1000 // one week
    },
    store: new KyotoStore(),
  }),
  ...
).listen(3001);

express

var KyotoStore = require('connect-kyoto').KyotoStore;
...
app.configure(function(){
  ...
  app.use(express.cookieParser());
  app.use(express.session({
    secret: 'your secret here',
    store: new KyotoStore(),
    cookie: {
      maxAge: 7 * 24 * 60 * 60 * 1000 // one week
    },
  }));
  ...
});

Running Tests

connect-kyoto depends on Vows for testing.

  1. Invoke kyoto-tycoon database server by ktserver_invoker.js

    $ node ktserver_invoker.js

  2. Run the tests.

    $ vows test/*.js

License

MIT license.

TODO

  • feature : db option
  • refactoring : unit test kyoto-tycoon mock server.