Interface ServeDirOptions
interface ServeDirOptions {
enableCors?: boolean;
etagAlgorithm?: AlgorithmIdentifier;
fsRoot?: string;
headers?: string[];
quiet?: boolean;
showDirListing?: boolean;
showDotfiles?: boolean;
showIndex?: boolean;
urlRoot?: string;
}
enableCors?: boolean;
etagAlgorithm?: AlgorithmIdentifier;
fsRoot?: string;
headers?: string[];
quiet?: boolean;
showDirListing?: boolean;
showDotfiles?: boolean;
showIndex?: boolean;
urlRoot?: string;
}
Index
Properties
OptionalenableCors
enableCors ?: boolean
Enable CORS via the
Access-Control-Allow-Origin
header.
OptionaletagAlgorithm
etagAlgorithm ?: AlgorithmIdentifier
The algorithm to use for generating the ETag.
OptionalfsRoot
fsRoot ?: string
Serves the files under the given directory root. Defaults to your current directory.
Optionalheaders
headers?: string[]
Headers to add to each response
Optionalquiet
quiet?: boolean
Do not print request level logs.
OptionalshowDirListing
showDirListing ?: boolean
Enable directory listing.
OptionalshowDotfiles
showDotfiles ?: boolean
Serves dotfiles.
OptionalshowIndex
showIndex ?: boolean
Serves index.html as the index file of the directory.
OptionalurlRoot
urlRoot ?: string
Specified that part is stripped from the beginning of the requested pathname.
Interface for serveDir options.