Skip to content

createFetchHandler

function createFetchHandler(options): CreateFetchHandlerResult;

Defined in: server/create-fetch-handler.ts:135

Build the panel fetch handler.

Parameter Type
options FlagsPanelOptions

CreateFetchHandlerResult

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 });