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
Post a Comment