Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface HttpServer<TRequest, TResponse>

Type parameters

  • TRequest = any

  • TResponse = any

Hierarchy

  • HttpServer

Index

Methods

close

  • close(): any

createMiddlewareFactory

  • createMiddlewareFactory(method: RequestMethod): ((path: string, callback: Function) => any) | Promise<(path: string, callback: Function) => any>

delete

enableCors

get

getHttpServer

  • getHttpServer(): any

getInstance

  • getInstance(): any

Optional getRequestHostname

  • getRequestHostname(request: TRequest): string

Optional getRequestMethod

  • getRequestMethod(request: TRequest): string

Optional getRequestUrl

  • getRequestUrl(request: TResponse): string

getType

  • getType(): string

head

Optional init

  • init(): Promise<void>

initHttpServer

listen

  • listen(port: number | string, callback?: () => void): any
  • listen(port: number | string, hostname: string, callback?: () => void): any

options

patch

post

put

redirect

  • redirect(response: any, statusCode: number, url: string): any

registerParserMiddleware

  • registerParserMiddleware(): any

render

  • render(response: any, view: string, options: any): any

reply

  • reply(response: any, body: any, statusCode?: number): any

Optional setBaseViewsDir

  • setBaseViewsDir(path: string | string[]): this

Optional setErrorHandler

  • setErrorHandler(handler: Function, prefix?: string): any

setHeader

  • setHeader(response: any, name: string, value: string): any

Optional setNotFoundHandler

  • setNotFoundHandler(handler: Function, prefix?: string): any

Optional setViewEngine

  • setViewEngine(engineOrOptions: any): this

status

  • status(response: any, statusCode: number): any

use

Optional useStaticAssets

  • useStaticAssets(...args: any[]): this

Generated using TypeDoc