Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface WebServerOptions

Hierarchy

  • WebServerOptions

Index

Properties

Optional certificate

certificate: string | Buffer

Optional defaultHandler

defaultHandler: (ev: WebEvent) => void

Specify the default handler for a request when no other route matches (aka 404). When explicitly set to null, no default handler will be used (useful when chaining the Alterior application into a larger application)

Type declaration

Optional engine

engine: any

A class which implements WebServerEngine. Can be one of the builtin engines (ExpressEngine, FastifyEngine) or a custom engine

Optional handleError

handleError: (error: any, event: WebEvent, route: RouteInstance, source: string) => void

A handler which is run when an error occurs while processing a request. When this handler is defined, all default error handling is skipped. If you want to observe errors without suppressing the default error handling, use onError instead.

Type declaration

Optional hideExceptions

hideExceptions: boolean

Whether or not to hide exception details from the web response output

Optional middleware

middleware: Function[]

Connect-style middleware that should be run before the final request handler

Optional onError

onError: (error: any, event: WebEvent, route: RouteInstance, source: string) => void

A handler which is run when an error occurs while processing a request. After the handler is completed, the default error handling will proceed.

Type declaration

Optional port

port: number

Optional privateKey

privateKey: string | Buffer

Optional protocols

protocols: Protocol[]

What protocols should be supported on incoming client connections If not specified, HTTP/2, SPDY and HTTP/1.1 will all be supported if an SSL certificate is provided. If not, then only HTTP/1.1 will be supported.

Optional silent

silent: boolean

By default the requests being processed are reported via the logger. When silent is true, this is suppressed.

Optional silentErrors

silentErrors: boolean

By default when an error occurs while processing a request, it is reported to the console for inspection. When silentErrors is true, this is suppressed.

Generated using TypeDoc