title: How to pass variables to a view in Express?
body: <p>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:</p>
  
  <pre><code>// Dashboard for site after the login
  app.get('/dashboard', function(req, res) {
   res.render('dashboard.jade', {
    title: 'Dashboard',
    user: app.get('user_name')
   });
  });
  </code></pre>
  
  <p>I have stored the user name in <code>app.get('user_name')</code>. If I replace it with a normal string like <code>'test string'</code> than it works. But if I use this <code>app.get</code> function nothing is getting passed to the view.</p>
  
  <p>Thanks</p>