I would like to have a middleware function which modifies the response body.
This is for an express server.
Something like:
function modify(
You don't need to listen to any events. Just make it
function modify(req, res, next){ res.body = res.body + "modified"; next(); }
And use it after you use the router. This way after all your routes have executed you can modify the body
use