createEphemeralEndpoint | WebHare Platform SDK
WebHare Platform SDK
    Preparing search index...

    Function createEphemeralEndpoint

    • Create an ephemeral backend endpoint served by a callback in this process. The endpoint remains available until closed, disposed, or this process exits. Requests to subpaths are supported. The callback's baseURL is the endpoint URL with a trailing slash, and localPath is the URL-decoded, lowercase path relative to that base.

      Parameters

      • callback: (request: WebRequest) => Promise<WebResponse>

        Handle each incoming request and return its response.

      Returns Promise<EphemeralEndpoint>

      A handle containing the URL. Close or dispose it when no longer needed.