Skip to main content
Module

x/embedder/helpers/oak.ts>serveFile

Dev tools for embedding static files into Deno as code.
Go to Latest
function serveFile
import { serveFile } from "https://deno.land/x/embedder@v0.9.1/helpers/oak.ts";

Serve a single file from a directory, with the correct mime type.

Ex: serveFile(ctx, staticFiles.dir, "foo/bar.txt")

Parameters

ctx: _oak.Context
filePath: string