I am able to set and access session variables, like req.session.t1, etc. and all works fine on server side. On client side I have jquery installed on the front end and accessed by jade template.
I have in functions.js:
$(function(){
var t1 = req.session.t1;
$('.results').append(t1);
});
So as page/jade template loads, jquery does append the the data as outlined IF I use constants or a string, but session variables are undefined if I use req.session.x or session.x.
So question is, how would I best be able to manipulate via jQuery, session variables? Or do I need to save to DB and pull it up each time? I'm newbie and not sure how to do this in node js and express and jquery.