Skip to main content
Module

x/cav/asset.ts>AssetsLocation

A server framework for Deno
Go to Latest
interface AssetsLocation
import { type AssetsLocation } from "https://deno.land/x/cav@0.2.0-alpha.4/asset.ts";

Object denoting the location of an assets directory.

Properties

optional
cwd: string

Sets the current working directory when looking for the assets folder. If a file://, http://, or https:// path is provided, the parent folder of the path is used. This is useful if you want to serve assets relative to the current file using import.meta.url. Default: "."

optional
dir: string

The path of the assets directory relative to the cwd. This pattern encourages keeping public asset files separated from application source code, so that code isn't processed by mistake. Default: "assets"