Skip to main content
Module

x/http_server/mod.ts>Server#static

🌐 Light-weight http server
Latest
method Server.prototype.static
import { Server } from "https://deno.land/x/http_server@v2.0.5/mod.ts";

Add a static file server.

Examples

server.static(); server.static('/files'); server.static('/files', '/path/to/files');

Parameters

optional
route = [UNSUPPORTED]
  • The route to serve on.
optional
root = [UNSUPPORTED]
  • The path to serve files from.