Interface IApp

interface IApp {
    get meta(): RouteMeta[];
    get server(): undefined | Server<typeof IncomingMessage, typeof ServerResponse>;
    addOptions(options: Options): IApp;
    addRouters(routers: IRouter | IRouter[]): IApp;
    build<T>(options?: null | T, mod?: {
        createServer(requestListener?: RequestListener<typeof IncomingMessage, typeof ServerResponse>): Server<typeof IncomingMessage, typeof ServerResponse>;
        createServer(options: T, requestListener?: RequestListener<typeof IncomingMessage, typeof ServerResponse>): Server<typeof IncomingMessage, typeof ServerResponse>;
    }): Server<typeof IncomingMessage, typeof ServerResponse>;
    disable(setting: string): IApp;
    disabled(setting: string): boolean;
    enable(setting: string): IApp;
    enabled(setting: string): boolean;
    on(event: string, callback: ((parent: Application<Record<string, any>>) => void)): IApp;
}

Implemented by

Accessors

  • get meta(): RouteMeta[]
  • Returns RouteMeta[]

  • get server(): undefined | Server<typeof IncomingMessage, typeof ServerResponse>
  • Returns undefined | Server<typeof IncomingMessage, typeof ServerResponse>

Methods

  • Parameters

    Returns IApp

  • Parameters

    • routers: IRouter | IRouter[]

    Returns IApp

  • Type Parameters

    • T extends ServerOptions<typeof IncomingMessage, typeof ServerResponse> = ServerOptions<typeof IncomingMessage, typeof ServerResponse>

    Parameters

    • Optionaloptions: null | T
    • Optionalmod: {
          createServer(requestListener?: RequestListener<typeof IncomingMessage, typeof ServerResponse>): Server<typeof IncomingMessage, typeof ServerResponse>;
          createServer(options: T, requestListener?: RequestListener<typeof IncomingMessage, typeof ServerResponse>): Server<typeof IncomingMessage, typeof ServerResponse>;
      }
      • createServer:function
        • Parameters

          • OptionalrequestListener: RequestListener<typeof IncomingMessage, typeof ServerResponse>

          Returns Server<typeof IncomingMessage, typeof ServerResponse>

        • Parameters

          • options: T
          • OptionalrequestListener: RequestListener<typeof IncomingMessage, typeof ServerResponse>

          Returns Server<typeof IncomingMessage, typeof ServerResponse>

    Returns Server<typeof IncomingMessage, typeof ServerResponse>

  • Parameters

    • setting: string

    Returns IApp

  • Parameters

    • setting: string

    Returns boolean

  • Parameters

    • setting: string

    Returns IApp

  • Parameters

    • setting: string

    Returns boolean

  • Parameters

    • event: string
    • callback: ((parent: Application<Record<string, any>>) => void)
        • (parent): void
        • Parameters

          • parent: Application<Record<string, any>>

          Returns void

    Returns IApp