Skip to main content
Module

x/peko/mod.ts>routesFromDir

Featherweight apps on the edge 🐣⚡
Go to Latest
variable routesFromDir
import { routesFromDir } from "https://deno.land/x/peko@1.8.2/mod.ts";

Recursively create an array of routes with the static handler for all files/sub-directories in the provided directory.

type

(
dirUrl: URL,
handlerGen: (url: URL) => Handler,
middleware?: Middleware | Middleware[],
_depth?,
) => Promise<Route[]>