Configuration-based middleware registration for Express.js. Current stable version is 3.0.4. Meddleware allows you to define middleware in a configuration object with options like enabled, priority, route, and module. It supports loading middleware from npm modules or local files, specifying factory methods and arguments, and flow control (parallel, series). Key differentiators include priority-based ordering, route-based activation, and parallel/sequential execution control. The package has been around since Express 4.x and is part of the Kraken.js ecosystem. It is maintained with a focus on production usage.
npm install meddlewareVerified import paths — ran on the pinned version, not inferred.
Shows basic usage of meddleware to register middleware from configuration with priority, enabled flag, and module arguments.
Explicitly set `enabled: false` for middleware you want disabled, or upgrade to v3 which keeps the same behavior.
Check if your middleware factory relies on `this` being `null`; if so, update it to handle the new context.
Consider using an ordered array of middleware definitions if you need strict ordering.
Use a JSON preprocessor like shortstop with shortstop-regex, or define config in JavaScript instead of JSON.
If using regex routes, consider the mountpath manually or use string routes.
Set `method` in the config to the exact exported function name you want to use.
Upgrade to v3.0.4 or ensure all middleware modules are in the app's node_modules directory.
Use `const meddleware = require('meddleware');` or enable esModuleInterop in TypeScript and use `import meddleware from 'meddleware';`Install the module with `npm install some-middleware` and ensure it is in the app's node_modules. For local modules, use a relative path like './lib/some-middleware'.
Check the module's exports. Set `method` to the exact exported function name, or omit it if the module itself is the middleware factory.
No dependency data recorded yet.