Hey.
I'm having problems and I'm not sure if this is possible but it would be really nice if it did.
As of right now, we're having an application where you can chat with each other independant of which site the peers are on.
The problem is that it's per request-based, meaning if I request a new site the chat will be empty when that page is loaded.
Since the div that holds the chat is called the same on every site I wondered if you could just make express pass that parameter as a sessionvariable that I can initiate the div with on body load.
I haven't been able to figure out a way to do this without doing a post-route which complicates it alot.
Does anyone have a good easy solution for this?
Something in the way of:
app.use(function (req, res, next) {
req.session.conversation = req.body.conversation;
next()
});
and then just having something like this on every site
body(onload=setChat('#{session.conversation}', domID)")
Thanks in advance.
Daniel