Skip to main content
Module

x/cav/deps.ts>fileServer.serveFile

A server framework for Deno
Go to Latest
function fileServer.serveFile
import { fileServer } from "https://deno.land/x/cav@0.0.21/deps.ts";
const { serveFile } = fileServer;

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.