From 8cc5a50b91a3d80b28b03191b246974d3aca9bf8 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Tue, 25 Jan 2022 20:58:57 +0100 Subject: polish + menu --- source/server/index.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/server/index.ts') diff --git a/source/server/index.ts b/source/server/index.ts index 75114ea..3fc32ce 100644 --- a/source/server/index.ts +++ b/source/server/index.ts @@ -10,6 +10,11 @@ let bundleFiles: Record = {} root.get("/", async c => { await c.send({ path: "index.html", root: `${Deno.cwd()}/public` }) }) root.get("/room/:id", async c => { await c.send({ path: "index.html", root: `${Deno.cwd()}/public` }) }) +root.get("/licen(c|s)e", async c => { + c.response.body = await Deno.readTextFile("LICENCE") + c.response.headers.set("Content-Type", "text/plain") +}) + root.get("/favicon.ico", c => { c.response.status = 204 }) // deno-lint-ignore no-explicit-any -- cgit v1.2.3-70-g09d2