Is there a way to render template to a variable instead to output?
res.render('list.ejs', { posts: posts });
something like this
var list = render('list.ejs', { posts: posts });