Skip to main content
Module

x/file_server_plus/mod.ts>ServeDirOptions

`deno` static file webserver, clone of `file_server.ts`, PLUS an additional final "404 handler" to run arbitrary JS/TS
Go to Latest
interface ServeDirOptions
import { type ServeDirOptions } from "https://deno.land/x/file_server_plus@0.2.2/mod.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

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

optional
showDirListing: boolean

Enable directory listing. Defaults to false.

optional
showDotfiles: boolean

Serves dotfiles. Defaults to false.

optional
enableCors: boolean

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

optional
quiet: boolean

Do not print request level logs. Defaults to false. Defaults to false.

optional
etagAlgorithm: EtagAlgorithm

The algorithm to use for generating the ETag. Defaults to "fnv1a".