1.0.5 • Published 4 years ago
savvy_api_helpers v1.0.5
API koa middleware
"Add the middleware in order"
- param_parser : parse the incoming request parameter json/xml and re-assign to request body.
- error_handler : handle exception error or throwed error each middleware through downstream middleware.
- request_logger : contruct message content of request and its response content.
- listener : create event listener for 'error' and 'logger' and log/console log the content.
- request : add to the end middleware of router to log the request and its response content "must add next()".