Module

x/hono/middleware/serve-static/index.ts>serveStatic

Fast, Lightweight, Web-standards
Very Popular
Go to Latest
variable serveStatic
import { serveStatic } from "https://dotland.deno.dev/x/hono@v4.1.0/middleware/serve-static/index.ts";

This middleware is not directly used by the user. Create a wrapper specifying getContent() by the environment such as Deno or Bun.

type

<E extends Env = Env>(options: ServeStaticOptions<E> & { getContent: (path: string) => any; pathResolve?: (path: string) => string; }) => MiddlewareHandler