Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FastifyAdapter

Hierarchy

Index

Constructors

constructor

  • new FastifyAdapter(instanceOrOptions?: fastify.FastifyInstance<any, any, any> | fastify.ServerOptions | fastify.ServerOptionsAsHttp | fastify.ServerOptionsAsHttp2 | fastify.ServerOptionsAsSecure | fastify.ServerOptionsAsSecureHttp | fastify.ServerOptionsAsSecureHttp2): FastifyAdapter
  • Parameters

    • Default value instanceOrOptions: fastify.FastifyInstance<any, any, any> | fastify.ServerOptions | fastify.ServerOptionsAsHttp | fastify.ServerOptionsAsHttp2 | fastify.ServerOptionsAsSecure | fastify.ServerOptionsAsSecureHttp | fastify.ServerOptionsAsSecureHttp2 = fastify()

    Returns FastifyAdapter

Methods

close

  • close(): any

createMiddlewareFactory

  • createMiddlewareFactory(requestMethod: RequestMethod): function

enableCors

getHttpServer

  • getHttpServer<T>(): T

getInstance

  • getInstance<T>(): T

getRequestMethod

  • getRequestMethod(request: any): string

getRequestUrl

  • getRequestUrl(request: any): string

initHttpServer

inject

  • inject(...args: any[]): any

listen

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

register

  • register(...args: any[]): any

registerParserMiddleware

  • registerParserMiddleware(): void

render

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

reply

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

setErrorHandler

  • setErrorHandler(handler: Function): any

setHeader

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

setNotFoundHandler

  • setNotFoundHandler(handler: Function): any

setViewEngine

  • setViewEngine(options: any): any

status

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

useStaticAssets

  • useStaticAssets(options: object): any

Generated using TypeDoc