expressjs/session — pull request #26 by ricardofbarros (2014-04-22 16:18:57+00:00)
Title: Removing dependency with cookieParser module

Right now to make session module to work you need to do something like this:

app.use(cookieParser());
app.use(session(opt));

I will make two argument points to the problem I think exists.
First, I think this isn't the "right way" to do things, If you want session enabled in your express app you will need to have basically two modules cookieParser and session, shouldn't session be "independent" as a module block ?

Second, having this two modules installed leads to have cookie and cookie-parser duplicated in the dependencies of these modules (node_modules).

The solution should be a "merge" of cookieParser and session, something like I have done, and so the session module becomes truly independent of cookieParser and you can enable sessions in express app like this:

app.use(session(opt));