feat: add static file support (#58)

This commit adds support for serving static files. Static can be placed
into the `/static` directory (as a sibling of the `/pages` directory).
This commit is contained in:
Luca Casonato
2021-09-25 13:37:46 +02:00
committed by GitHub
parent a25ec7109c
commit 75afa6daca
9 changed files with 117 additions and 35 deletions
+7 -1
View File
@@ -2,7 +2,13 @@
export { renderToString } from "https://esm.sh/preact-render-to-string@5.1.19?deps=preact@10.5.14";
// -- std --
export { extname } from "https://deno.land/std@0.108.0/path/mod.ts";
export {
extname,
fromFileUrl,
toFileUrl,
} from "https://deno.land/std@0.108.0/path/mod.ts";
export { walk } from "https://deno.land/std@0.108.0/fs/walk.ts";
export { listenAndServe } from "https://deno.land/std@0.108.0/http/server.ts";
// -- router --
export * as router from "https://crux.land/router@0.0.4";