-
-
Notifications
You must be signed in to change notification settings - Fork 155
Open
Labels
Description
Hey, would be great to have req and res added to the arguments passed back through, when using the template as a function.
render(locals, function (err, body) {
if (err) return next(err);
var buf = new Buffer(body, 'utf8');
res.setHeader('Content-Type', 'text/html; charset=utf-8');
res.setHeader('Content-Length', buf.length);
res.end(buf);
});
So would look like:
render(locals, function (err, body) {
if (err) return next(err);
var buf = new Buffer(body, 'utf8');
res.setHeader('Content-Type', 'text/html; charset=utf-8');
res.setHeader('Content-Length', buf.length);
res.end(buf);
},req, res);