Skip to main content
Module

x/netzo/mod.ts>serveStatic

SDK for Netzo, the open platform to instantly deploy JavaScript and TypeScript to URL endpoints, connect essential APIs, automate business processes and build internal tools faster, without managing servers.
Go to Latest
function serveStatic
import { serveStatic } from "https://deno.land/x/netzo@v0.1.44/mod.ts";

Serve static files hosted on the internet or relative to your source code.

Be default, up to 20 static assets that are less than 10MB are cached. You can disable caching by setting cache: false in the options object.

Examples

Example 1

import { serve, serveStatic } from "https://deno.land/x/sift/mod.ts"

serve({
 // It is required that the path ends with `:filename+`
 "/:filename+": serveStatic("public", { baseUrl: import.meta.url }),
})

Parameters

relativePath: string