Skip to main content

@std/http@0.215.0

latest
Works with
It is unknown whether this package works with Browsers, Deno, Node.js, Cloudflare Workers, Bun
It is unknown whether this package works with Browsers
It is unknown whether this package works with Deno
It is unknown whether this package works with Node.js
It is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Bun
JSR Score70%
Published2 years ago (0.215.0)
interface ServeDirOptions

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.

Enable directory listing.

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.

The algorithm to use for generating the ETag.

optional
headers: string[] = []

Headers to add to each response

Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@std/http

Import symbol

import { type ServeDirOptions } from "@std/http";
or

Import directly with a jsr specifier

import { type ServeDirOptions } from "jsr:@std/http";