Skip to main content
Module

x/http_fns/discover_routes.ts>DiscoverRoutesOptions

A bunch of functions for building HTTP servers
Go to Latest
interface DiscoverRoutesOptions
import { type DiscoverRoutesOptions } from "https://deno.land/x/http_fns@v0.0.27/discover_routes.ts";

Options for the discoverRoutes function

Properties

optional
pattern: PathPattern

The root URL path pattern under which all discovered routes are nested. Defaults to '/'.

optional
fileRootUrl: string | URL

The root folder to walk in the filesystem as a file: URL.

optional
pathMapper: PathMapper

Function to transform a discovered path entry.

optional
routeMapper: RouteMapper

Function to mapper each file entry to zero, one or many routes. The default mapping only maps typescript files.

optional
compare: RouteComparator

Function to compare two routes to determine ordering of the discovered routes.

optional
consolidate: boolean

Consolidate adjacent routes that have the same module specifier.

optional
verbose: boolean

Log all discovered routes.