I would like to have a middleware function which modifies the response body.
This is for an express server.
Something like:
function modify(req, res, next){
  res.on('send', function(){
    res.body = res.body + "modified"
  });
  next();
}
express.use(modify);
I don't understand what event to listen for. Any help or documentation would be appreciate.