Function createEphemeralEndpoint
- createEphemeralEndpoint(
callback: (request: WebRequest) => Promise<WebResponse>,
): Promise<EphemeralEndpoint>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.
- callback: (request: WebRequest) => Promise<WebResponse>
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.