tezx
Version:
TezX is a modern, ultra-lightweight, and high-performance JavaScript framework built specifically for Bun. It provides a minimal yet powerful API, seamless environment management, and a high-concurrency HTTP engine for building fast, scalable web applicat
19 lines (18 loc) • 514 B
TypeScript
import { Middleware } from "../types/index.js";
/**
* Logger Middleware
* Logs incoming requests with method, pathname, status, and execution time.
*
* @returns {Middleware} - A middleware function for logging HTTP requests.
*
* @example
* ```ts
* import { logger } from 'tezx/logger';
*
* app.use(logger());
* ```
*/
declare function logger<T extends Record<string, any> = {}, Path extends string = any>(options?: {
enabled: boolean;
}): Middleware<T, Path>;
export { logger as default, logger };