I am quite new to Express.js/Node.js and trying to pass multiple values from a route to a view so that I am able to show user specific input on the page. This is what I have in my route:
// Dashboard for site after the login
app.get('/dashboard', function(req, res) {
res.render('dashboard.jade', {
title: 'Dashboard',
user: app.get('user_name')
});
});
I have stored the user name in app.get('user_name'). If I replace it with a normal string like 'test string' than it works. But if I use this app.get function nothing is getting passed to the view.
Thanks