Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/fsrouter/mod.ts

A file system based router for Deno.
Go to Latest
import * as fsrouter from "https://deno.land/x/fsrouter@2.8.0/mod.ts";

Functions

fsRouter creates a standard library Handler which handles requests according to the shape of the filesystem at the given rootDir. Each file within rootDir must provide a FsHandler as its default export, which will be used to execute requests if the requested route matches the file's position in the filesystem. See docs on FsHandler.

Interfaces

A collection of options to be passed in on initialization.