Skip to main content
Module

x/nattramn/deps.ts>serveFile

Universal web applications with Deno.
Latest
function serveFile
import { serveFile } from "https://deno.land/x/nattramn@v0.0.38/deps.ts";

Returns an HTTP Response with the requested file as the body.

Parameters

req: Request

The server request context used to cleanup the file handle.

filePath: string

Path of the file to serve.

optional
unnamed 2: ServeFileOptions = [UNSUPPORTED]