From 985763e3fcb6762fa76b81c059a97648905b3761 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sat, 18 Jul 2020 21:54:58 +0200 Subject: Started fileview --- src/handler/fileView.ts | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 src/handler/fileView.ts (limited to 'src/handler/fileView.ts') 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) }); +}; -- cgit v1.2.3