UNPKG

tezx

Version:

TezX is a high-performance, lightweight JavaScript framework designed for speed, scalability, and flexibility. It enables efficient routing, middleware management, and static file serving with minimal configuration. Fully compatible with Node.js, Deno, an

17 lines (16 loc) 483 B
import { Middleware } from "../core/router.js"; /** * Request ID Middleware * Assigns a unique request ID to each incoming request. * * @param {string} [headerName="X-Request-ID"] - Header name to use for request ID. * @returns {Middleware} - A middleware function for tracking requests. * * @example * ```ts * import { requestID } from 'tezx'; * * app.use(requestID()); * ``` */ export declare const requestID: (headerName?: string, contextKey?: string) => Middleware;