session-manager provides a session management layer around node's built in http server using cookies.
This example builds on Node's example web server, and responds with an incrementing count, per user.
var http = ;var sessionManager = ;// Best to use one shared session manager across requestsvar sessionManager = sessionManager;// Usage with Node's HTTP Serverhttp;console;
It supports various (and extensible) data storage engines. Currently included ones are:
It is simple to create a new storage engine, e.g. redis by creating an object with two function keys,
set(session_id, key, val) and
The simplest example to base this on is the memory engine (./engines/memory.js).