Constructors

Properties

onceRouterPaths: [string, ParsedPathConfig][] = []

Entries of [router path, ParsedPathConfig] for single-use routes

options: RouterConfig

Router config options

routerPaths: [string, ParsedPathConfig][] = []

Entries of [router path, ParsedPathConfig]

routes: Record<string, ParsedPathConfig> = {}

Path-keyed router route config object

Methods

  • Creates a simple opaque proxy

    Parameters

    • request: IncomingMessage

      The request

    • response: MoxyResponse

      The response

    • proxyUrl: string

      The proxy url

    • Optionaloptions: RequestOptions

      The request options

    Returns void

  • Convert simple replacement params into regex match groups

    Parameters

    • url: string

      The url

    Returns string

  • Removes a route

    Parameters

    • path: string

      The path

    Returns this