Interface Router

Routers are responsible for matching requests to the request handler chain and returning the matched handlers.

They are the internal manager of request handlers and middleware.

interface Router {
    handle(domain: string, handler: Handler): void;
    match(domain: string): Handler;
    use(handler: Handler): void;
}

Implemented by

Methods

Methods