Skip to main content
Module

x/http_fns/generate.ts>GenerateOptions

A bunch of functions for building HTTP servers
Go to Latest
interface GenerateOptions
implements Omit<DiscoverRoutesOptions,
| "pathMapper"
| "routeMapper"
| "compare"
| "consolidate"
>
import { type GenerateOptions } from "https://deno.land/x/http_fns@v0.0.27/generate.ts";

Properties

moduleOutUrl: string

The absolute path of the module to be generated, as a file: URL.

optional
routeDiscovery: "static" | "startup" | "request"

Whether to discover routes at build time and generate a static list or, discover them dynamically at startup, or when the first request is made. Defaults to static.

optional
moduleImports: "static" | "dynamic"

Whether to generate static imports or dynamic imports, this only applies to 'static' route discovery. Defaults to dynamic.

optional
httpFns: string | URL

The base module specifier for the 'http_fns' imports. Defaults to a resolved URL relative to this module, but you may prefer to supply a bare module specifier as declared in your import map instead. Example: "$http_fns/"

optional
pathMapper: string | URL

Module that supplies a PathMapper as the default function.

optional
routeMapper: string | URL

Module that supplies a RouteMapper as the default function.

optional
compare: string | URL

Module that supplies a RouteComparator as the default function.