-
-
Notifications
You must be signed in to change notification settings - Fork 22.8k
Closed
Labels
Description
I know how to create/use middleware and I'm aware of Writing middleware for use in Express apps, however I am curious about packaging/publishing middleware.
Many of the express middleware seems to be following this convention:
let middle = require('middleware-name');
let options = {};
app.use(middle(options));I have used the same for a couple of projects of mine since it seems really useful way of including the options, but haven't seen it anywhere as a recommended way of doing it. Is this part of some standard/recommended way of creating middleware? Should I edit that guide to reflect this as the recommended way?
Reactions are currently unavailable