HttpRouterSettings: {
    middlewares?: OneOrMore<WinterTcMiddleware>;
    router: Router<RouterEntry>;
}

Configuration options for HttpRouter.

IMPORT_PATH: "@daiso-tech/core/http-router"

Type declaration

  • Optionalmiddlewares?: OneOrMore<WinterTcMiddleware>

    One or more WinterTC middleware functions or objects to apply to every incoming request before route matching.

    These run at the top level of the router, before any route-specific middlewares or endpoint handlers. Useful for cross-cutting concerns such as logging, CORS, authentication, or request timing.

  • router: Router<RouterEntry>

    A Hono router instance.

    import { RegExpRouter } from "hono/router/reg-exp-router";
    import { SmartRouter } from "hono/router/smart-router";
    import { TrieRouter } from "hono/router/trie-router";

    new SmartRouter({
    routers: [new RegExpRouter(), new TrieRouter()],
    })