How can I pass variable when render view to script tag in Node.js <p>I'm using hbs as a template engine along with html. This is my setting.</p> <pre><code>app.set('view engine', 'html'); app.engine('html', hbs.__express); </code></pre> <p>In my route.js</p> <pre><code>router.get('/home', isAuthenticated, function(req, res){ res.render('home', { user: data something }); }); </code></pre> <p>In my home.html I want to use user variable not as a template but to do something</p> <pre><code>&lt;script&gt; var user = {{user}}; // It don't recognize user variable /* do something about user variable */ &lt;/script&gt; </code></pre>