-
-
Notifications
You must be signed in to change notification settings - Fork 797
Closed
Milestone
Description
Looks like this works:
app.use(endpoint, function (req, res, next) {
console.log(`${endpoint} before 1`);
next();
}, function (req, res, next) {
console.log(`${endpoint} before 2`);
next();
}, Stream);But this doesn't: (TypeError: Router.use() requires middleware function but got a Object)
app.use(endpoint, function (req, res, next) {
console.log(`${endpoint} before 1`);
next();
}, function (req, res, next) {
console.log(`${endpoint} before 2`);
next();
}, Stream, function (req, res, next) {
console.log(`${endpoint} after`);
next();
});I also tried this, but the after handler simply gets ignored:
app.use(endpoint, function (req, res, next) {
console.log(`${endpoint} before 1`);
next();
}, function (req, res, next) {
console.log(`${endpoint} before 2`);
next();
}, Stream);
app.use(endpoint, function (req, res, next) {
console.log(`${endpoint} after`);
next();
});Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels