Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
interface ServeDirOptions
import { type ServeDirOptions } from "https://deno.land/x/fathym_eac_runtime@v0.0.140/src/src.deps.ts";

Interface for serveDir options.

Properties

optional
fsRoot: string = "."

Serves the files under the given directory root. Defaults to your current directory.

optional
urlRoot: string = undefined

Specified that part is stripped from the beginning of the requested pathname.

optional
showDirListing: boolean = false

Enable directory listing.

optional
showDotfiles: boolean = false

Serves dotfiles.

optional
showIndex: boolean = true

Serves index.html as the index file of the directory.

optional
enableCors: boolean = false

Enable CORS via the "Access-Control-Allow-Origin" header.

optional
quiet: boolean = false

Do not print request level logs. Defaults to false.

optional
etagAlgorithm: AlgorithmIdentifier = "SHA-256"

The algorithm to use for generating the ETag.

optional
headers: string[] = []

Headers to add to each response