Azure Middleware Engine is a Node.js middleware engine for Azure Functions, inspired by Express, Fastify, and Hapi. Version 1.0.1 (stable) provides an intuitive API to apply middleware patterns in Azure Functions. It supports sequential middleware execution, conditional middleware via useIf, and validation. Alternatives like Azure Functions middleware libraries often lack chainable API or conditional execution. The package is lightweight with no external runtime dependencies, requiring Node >=8.9.4. It helps separate concerns like input parsing, validation, and error handling from business logic.
npm install azure-middlewareNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic middleware chain with context logging and response via context.done.
Always call context.next() in async or callback-style middlewares.
Ensure only one middleware calls context.done() and that it's called after all next() calls.
Ensure predicate function returns a boolean or a promise resolving to boolean.
Use const { MiddlewareHandler } = require('azure-middleware');Ensure next() is called only once per middleware and not after context.done().
Design pipeline so that only one middleware calls done() (typically the last).
No dependency data recorded yet.