Skip to main content
Module

x/abc/app.ts>Application#static

A better Deno framework to create web application.
Latest
method Application.prototype.static
import { Application } from "https://deno.land/x/abc@v1.3.3/app.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