Hello guys,

I migrated to Express 4.x from 3.x, installed all middleware, prepared 
code, etc. Everything works fine except one thing — I cannot store sessions 
in cookies anymore, at least by old way. In 3.x I used something like this:

> app.use(express.cookieParser());
> app.use(express.cookieSession({
>   secret: 'blah-blah-blah-23947',
>   cookie: {
>     // 1 year
>     maxAge: 365 * 24 * 60 * 60 * 1000
>   }
> }));


In 4.x as I understand sessions store in memory and reset after restart an 
application by default (maybe it was 3.x by default also), I'm trying to 
use 'cookie-session' module, but it doesn't work for me. If I do not use 
'express-session' it saves only during server app session:

> app.use(cookieParser());
> app.use(cookieSession({
>   keys: ['a', 'b']
> }));
> app.use(expressSession({
>   secret: "blah-blah-blah-23947",
>   cookie: {
>     // 1 year
>     maxAge: 365 * 24 * 60 * 60 * 1000
>   }
> }));


Probably I need to use cookieSession as expressSession.store, but It 
doesn't work also :(
If I won't find a way I will try to use Redis for sessions storing, this 
module already updated for Express 4.x.

Could somebody help?
Thank you!

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to