title: Render template to variable in expressjs
body: <p>Is there a way to render template to a variable instead to output?</p>
  
  <pre><code>res.render('list.ejs', {
      posts: posts
  });
  </code></pre>
  
  <p>something like this</p>
  
  <pre><code>var list = render('list.ejs', {
      posts: posts
  });
  </code></pre>