UNPKG

@chubbyts/chubbyts-framework

Version:

A minimal, highly performant middleware PSR-15 inspired function based micro framework built with as little complexity as possible, aimed primarily at those developers who want to understand all the vendors they use.

16 lines (15 loc) 854 B
import type { Handler, Middleware } from '@chubbyts/chubbyts-undici-server/dist/server'; /** * ```ts * import type { Middleware } from '@chubbyts/chubbyts-undici-server/dist/server'; * import { createErrorMiddleware } from '@chubbyts/chubbyts-framework/dist/middleware/error-middleware'; * import { createRouteMatcherMiddleware } from '@chubbyts/chubbyts-framework/dist/middleware/route-matcher-middleware'; * import { createApplication } from '@chubbyts/chubbyts-framework/dist/application'; * * const errorMiddleware: Middleware = createErrorMiddleware(...); * const routeMatcherMiddleware: Middleware = createRouteMatcherMiddleware(...); * * const application = createApplication([ errorMiddleware, routeMatcherMiddleware ]); * ``` */ export declare const createApplication: (middlewares: Array<Middleware>, handler?: Handler) => Handler;