I'm writing a small webapp with node and templar, and playing with logging debugging messages at the bottom of the page when running in testing mode. My thought process was to centralize this logging in one place, but it's made difficult by the fact that templar both writes to and ends the response. If we could pass in a boolean to the template function specifying whether or not templar should end the response, that'd be great. I'll attach a pull request where I've taken a crack at the enhancement.
Sounds reasonable. Maybe there should be an option { end: false } that you pass to the templar initialization, and then it's on you to call res.end() at some point.
I'm writing a small webapp with node and templar, and playing with logging debugging messages at the bottom of the page when running in testing mode. My thought process was to centralize this logging in one place, but it's made difficult by the fact that templar both writes to and ends the response. If we could pass in a boolean to the template function specifying whether or not templar should end the response, that'd be great. I'll attach a pull request where I've taken a crack at the enhancement.