createPanelHandler
function createPanelHandler(options): PanelHandler;Defined in: src/server/panel.ts:101
Build the panel handler.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options |
PanelOptions |
Returns
Section titled “Returns”Example
Section titled “Example”import { createPanelHandler, resolveUiDir } from "@xtandard/kit/server";
const panel = createPanelHandler({ basePath: options.basePath, title: options.title ?? "@xtandard/webhooks", globalName: "__WEBHOOKS_CONFIG__", uiDir: options.uiDir ?? resolveUiDir(import.meta.url), api: (request, path) => handleApiRequest(request, path, ctx), openapi: () => buildOpenApiDocument({ basePath, title }), tasks: [dispatcherTask],});Bun.serve({ fetch: panel.fetch });