Module

x/abc/mod.ts>Application#static

A better Deno framework to create web application.
Go to Latest
method Application.prototype.static
import { Application } from "https://dotland.deno.dev/x/abc@v1.2.4/mod.ts";

Register a new route with path prefix to serve static files from the provided root directory. For example, a request to /static/js/main.js will fetch and serve assets/js/main.js file.

app.static("/static", "assets");

Parameters

prefix: string
root: string