Skip to main content
Module

x/cav/endpoints.ts>assets

A server framework for Deno
Go to Latest
function assets
import { assets } from "https://deno.land/x/cav@0.0.24/endpoints.ts";

Creates an Endpoint for serving static assets. The routed request path will be used to find the asset to serve from inside the assets directory specified.

The calculated assets directory will be prepared and watched using watchAssets() unless the noPrep option is true. If the the --allow-write permission isn't available for the directory, asset watching will fail silently.

Parameters

optional
init: AssetsInit