Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "index"

Index

Classes

Interfaces

Variables

Functions

Variables

Const any

any: Filter<[]> = filter([])

A filter that matches any request

Functions

serve

  • Creates a server serving the provided filter

    Parameters

    Returns Server

  • Creates a server with the provided options serving the provided filter

    Parameters

    • filter: Filter<[Reply]>

      Filter to serve

    • options: HttpOptions | HttpsOptions

      Options for the inner http.Server (will automatically use HTTPS if both cert and key are provided)

    Returns Server

  • Creates a server serving the provided filter using the provided With wrapper globally

    Parameters

    Returns Server

  • Creates a server with the provided options serving the provided filter using the provided With wrapper globally

    Parameters

    • filter: Filter<[Reply]>

      Filter to serve

    • options: HttpOptions | HttpsOptions

      Options for the inner http.Server (will automatically use HTTPS if both cert and key are provided)

    • w: With<[Reply]>

      Global With wrapper

    Returns Server

writeReply

  • writeReply(reply: Reply, response: ServerResponse, body?: boolean): void
  • Writes a Reply to Node's http.ServerResponse

    Parameters

    • reply: Reply

      The reply to write

    • response: ServerResponse

      The response to write to

    • Default value body: boolean = true

      Whether to write the provided body

    Returns void

Generated using TypeDoc