Skip to main content
Module

x/http_fns/fresh/path_mapper.ts>freshPathMapper

A bunch of functions for building HTTP servers
Go to Latest
function freshPathMapper
import { freshPathMapper } from "https://deno.land/x/http_fns@v0.0.27/fresh/path_mapper.ts";

A Fresh-like path mapping function.

Supporting Fresh style path segments:

[name] - to match a single path segment, translates to :name in the URLPattern [...name] - to match multiple path segments, translates to :name* in the URLPattern

Also, extends the syntax with support for file extensions (see byMediaType) by adding .ext (for a required extension) or [.ext] (for an optional extension).

Example path: blog/[...path][.ext].tsx