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; } Accessors
meta
- get meta(): RouteMeta[]
Returns RouteMeta[]
server
- get server(): undefined | Server<typeof IncomingMessage, typeof ServerResponse>
Returns undefined | Server<typeof IncomingMessage, typeof ServerResponse>
Methods
addOptions
- addOptions(options): IApp
addRouters
- addRouters(routers): IApp
Parameters
- routers: IRouter | IRouter[]
build
- build<T>(options?, mod?): Server<typeof IncomingMessage, typeof ServerResponse>
Type Parameters
- T extends ServerOptions<typeof IncomingMessage, typeof ServerResponse> = ServerOptions<typeof IncomingMessage, typeof ServerResponse>
Parameters
Optional
options: null | TOptional
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>;
}createServer:function
- createServer(requestListener?): Server<typeof IncomingMessage, typeof ServerResponse>
Parameters
Optional
requestListener: RequestListener<typeof IncomingMessage, typeof ServerResponse>
Returns Server<typeof IncomingMessage, typeof ServerResponse>
- createServer(options, requestListener?): Server<typeof IncomingMessage, typeof ServerResponse>
Parameters
- options: T
Optional
requestListener: RequestListener<typeof IncomingMessage, typeof ServerResponse>
Returns Server<typeof IncomingMessage, typeof ServerResponse>
Returns Server<typeof IncomingMessage, typeof ServerResponse>
disabled
- disabled(setting): boolean
Returns boolean
enabled
- enabled(setting): boolean
Returns boolean
on
- on(event, callback): IApp
Parameters
- event: string
- callback: ((parent: Application<Record<string, any>>) => void)
- (parent): void
Parameters
- parent: Application<Record<string, any>>
Returns void