Skip to main content
Module

x/pagic/deps.ts>fileServer.serveFile

A static site generator powered by Deno + React
Go to Latest
function fileServer.serveFile
import { fileServer } from "https://deno.land/x/pagic@v1.5.1/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.