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

x/fsrouter/private/route.ts>Route

A file system based router for Deno.
Go to Latest
class Route
import { Route } from "https://deno.land/x/fsrouter@2.8.0/private/route.ts";

Constructors

new
Route(
file: string,
absPath: string,
absRootDir: string,
handler: FsHandler,
)

Properties

readonly
hasSlugs: boolean
readonly
length: number
readonly
parsed: string
readonly
parts: string[]
readonly
regEx: RegExp
readonly
relativePath: string
readonly
slugs: string[]

Methods

matches(urlPath: string): Record<string, string> | null

Static Methods

create(filePath: string, rootDir: string): Promise<Route>
sort(routes: Route[]): Route[]