Yummy is cookie session middleware for connect and its derivatives.
Cause you already have to use a cookie for sessions so why do more IO to get the data.
npm install yummy
Just drop the yummy middleware into your middleware stack after the cookie parser
var yummy = require('yummy');
app.use(connect.cookieParser());
app.use(yummy({
secret: 'fizzbuzz'
});
You can configure yummy with the following options.
the cookie will be encrypted using this secret string, keep it safe :)
the cookie options sets the default value for session cookies. You can
the max age of the cookie in milliseconds
the path of the session cookie (default is '/')