Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/frugal/dep/std/http.ts>serveFile

A frugal web framework
Go to Latest
function serveFile
import { serveFile } from "https://deno.land/x/frugal@0.3.0/dep/std/http.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]