Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/fresh/src/server/types.ts>RouterOptions

The next-gen web framework.
Extremely Popular
Go to Latest
interface RouterOptions
import { type RouterOptions } from "https://deno.land/x/fresh@1.6.5/src/server/types.ts";

Properties

optional
trailingSlash: boolean = false

Controls whether Fresh will append a trailing slash to the URL.

optional
ignoreFilePattern: RegExp = /(?:[^/]*_|[^/]*\.|)test\.(?:ts|tsx|mts|js|mjs|jsx|)\/*$/

Configures the pattern of files to ignore in islands and routes.

By default Fresh will ignore test files, for example files with a .test.ts or a _test.ts suffix.

optional
basePath: string = undefined

Serve fresh from a base path instead of from the root. "/foo/bar" -> http://localhost:8000/foo/bar