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

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

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -