citgm
citgm copied to clipboard
add on-finished module
Refs: https://github.com/nodejs/node/pull/31818#issuecomment-619133779
Its got about 12million downloads a week: https://www.npmjs.com/package/on-finished
https://www.npmjs.com/package/morgan might be useful, too, its a dep of generated express apps: https://github.com/expressjs/generator/blob/d1f3fcc6ccc7ab8986fb3438c82ab1a1f20dc50d/bin/express-cli.js#L167 EDIT: note on-finished is a dep of morgan, also of body-parser, final-handler, send
That said, I am not at all sure that their unit tests coverage is sufficient to prove they are robust in the face of corner cases, but I guess thats an issue with everything in citgm.