Skip to content

PanelOptions

Defined in: src/server/panel.ts:37

Options for createPanelHandler.

Property Type Description Defined in
api? (request, path) => Response | Promise<Response | null> | null The product’s API router. Receives the base-path-stripped path; returns a response, or null when the path is not an API route. src/server/panel.ts:57
basePath? string Mount prefix, e.g. "/webhooks". Default "" (root). src/server/panel.ts:39
bootstrap? () => Record<string, unknown> Extra bootstrap fields injected into index.html (beside title, basePath, readonly, logoUrl). src/server/panel.ts:59
cors? CorsOptions Answer CORS preflights and decorate every response. src/server/panel.ts:52
globalName string The global the SPA reads its bootstrap from, e.g. "__WEBHOOKS_CONFIG__". src/server/panel.ts:61
healthcheck? string | false Healthcheck path, or false to leave it to the product. Default "/healthcheck". src/server/panel.ts:67
logoUrl? string Logo image URL shown in the navbar in place of the title wordmark. src/server/panel.ts:43
openapi? () => Record<string, unknown> The OpenAPI document, served at /api/openapi.json and /openapi.json (public). src/server/panel.ts:63
readonly? boolean Reported to the SPA in the bootstrap. Default false. src/server/panel.ts:45
tasks? readonly PanelTask[] Background tasks: started now, stopped by close(). src/server/panel.ts:65
title string UI title, in the page and the bootstrap. src/server/panel.ts:41
uiDir? string The built SPA directory (see resolveUiDir). undefined serves no static files and the fallback page (e.g. on Workers). src/server/panel.ts:50