Answer the question
In order to leave comments, you need to log in
Universal request handling in NodeJS. What options?
Good evening. There is such a middleware plugin for express - morgan - https://github.com/expressjs/morgan, which allows you to automatically collect information on all requests to the server. The essence of the question is this: is it possible for any frameworks written for NodeJS to collect information in this way in some universal way? those. handle the response end or response finish events. so that the module that implements this functionality would work in any framework (hapi, koa, etc.)?
Answer the question
In order to leave comments, you need to log in
There can be no universal way, because all frameworks have their own architecture and their own philosophy.
Most frameworks use express.js as a base, so you can include your middleware plugins there. There is no universal way, as far as I know.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question