Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface HttpServer<TRequest, TResponse>

Type parameters

  • TRequest

  • TResponse

Hierarchy

  • HttpServer

Index

Methods

close

  • close(): any

createMiddlewareFactory

delete

enableCors

get

getHttpServer

  • getHttpServer(): any

getInstance

  • getInstance(): any

Optional getRequestMethod

  • getRequestMethod(request: TRequest): string

Optional getRequestUrl

  • getRequestUrl(request: TResponse): string

head

initHttpServer

listen

  • listen(port: number | string, callback?: function): any
  • listen(port: number | string, hostname: string, callback?: function): any

options

patch

post

put

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): any

setHeader

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

Optional setNotFoundHandler

  • setNotFoundHandler(handler: Function): any

Optional setViewEngine

  • setViewEngine(engineOrOptions: any): this

status

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

use

Optional useStaticAssets

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

Generated using TypeDoc