I\'m (almost) successfully using Node.js with Express and Redis to handle sessions.
The problem I\'m having is that the session is not kept when I use res.redirect
I was having a similar problem in that I was setting something on the session that was not persisting outside the app.get()
it was set in.
My problem turned out to be that I was not doing a res.redirect()
at the end of my app.get()
. Looks like I was setting something on a request object and then allowing it to get garbage collected.
I added a res.redirect( '/nextmethod' )
and the data persists just fine.