Interface HttpServerConstructor

interface HttpServerConstructor {
    new HttpServerConstructornew (name, createRequestListener, opts?): HttpServer;
}

Constructors

Constructors

  • Parameters

    • name: string
    • createRequestListener: RequestListenerFactory

      Function that, when called, will produce the [[requestListener]] function that will be called for each http request to the server. The function will be called once when the module is loaded. As such, it is a suitable place for expensive computation (like setting up a set of routes). The function returned can then utilize the results of that computation.

    • Optional opts: ResourceOptions

    Returns HttpServer

Generated using TypeDoc