In node.js when using commonly used Async wrapper used to catch and forward errors where is (req, res, next) coming from?

function(req, res, next) is callback function. It’s supposed to be called somewhere else, not in this snippet. In case of Express it’s called by Express itself on a request with respective arguments, req, res, next.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top