aboutsummaryrefslogtreecommitdiff
path: root/src/handler/fileView.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/handler/fileView.ts')
-rw-r--r--src/handler/fileView.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/handler/fileView.ts b/src/handler/fileView.ts
new file mode 100644
index 0000000..90c7176
--- /dev/null
+++ b/src/handler/fileView.ts
@@ -0,0 +1,6 @@
+import type { HandlerFunc, Context } from "https://deno.land/x/abc@master/mod.ts";
+import { cleanPath } from "../util/files.ts";
+
+export const handlePath: HandlerFunc = async (c: Context) => {
+ return await c.render("./src/views/index.html", { path: cleanPath(c.path) });
+};