Global session variable in express.js route? -


when set session in express.js route like

app.get('/', function(req, res() { req.session.foo = 'bar'; }); 

i can't access (undefined) in other routes. possible? there special configuration have consider?

thanks!

i solved setting sessions this:

global.session.email = json.parse(chunk).email; 

through this, session variables global!

solved!


Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

asp.net mvc - Implementing normal user/pass, Twitter & Facebook auth -