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

x/oak_nest/src/interfaces/mod.ts>StaticOptions

Refer to nestjs to realize some common functions for Deno
Go to Latest
interface StaticOptions
implements Omit<SendOptions, "root" | "gzip">
import { type StaticOptions } from "https://deno.land/x/oak_nest@v1.13.17/src/interfaces/mod.ts";

Interface describing options for serving static assets.

Properties

optional
baseDir: string

The root directory from which to serve static assets.

optional
prefix: string

Creates a virtual path prefix

optional
gzip: boolean | GzipOptions

If true, will gzip the files, and will generate the corresponding .gz file

optional
useOriginGzip: boolean

If true, will use the oak gzip, it will check the file extension with .gz, if it exists, it will use gzip, otherwise it will not process the file.