createFetchHandler
function createFetchHandler(options): CreateFetchHandlerResult;Defined in: server/create-fetch-handler.ts:135
Build the panel fetch handler.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options |
FlagsPanelOptions |
Returns
Section titled “Returns”Example
Section titled “Example”import { createFetchHandler } from "@xtandard/flags";import { createFileStorage } from "@xtandard/flags/storage/file";
const storage = createFileStorage({ dir: "./data/flags" });const { fetch, core } = createFetchHandler({ sourceStorage: storage, basePath: "/flags", title: "Acme Flags",});
Bun.serve({ port: 3000, fetch });