+export default {
+ async fetch(request) {
+ const url = new URL(request.url);
+
+ if (request.method === "GET" && url.pathname === "/") {
+ const file = await Deno.open("index.html");
+
+ return new Response(file.readable, {
+ headers: { "Content-Type": "text/html" },
+ });
+ }
+
+ if (request.method === "GET" && url.pathname === "/favicon.svg") {
+ const file = await Deno.open("favicon.svg");
+
+ return new Response(file.readable, {
+ headers: { "Content-Type": "image/svg+xml" },
+ });
+ }
+
+ if (request.method === "GET" && url.pathname === "/inter.woff2") {
+ const file = await Deno.open("inter.woff2");
+
+ return new Response(file.readable, {
+ headers: { "Content-Type": "font/woff2" },
+ });
+ }
+
+ if (request.method === "GET" && url.pathname === "/inter-italic.woff2") {
+ const file = await Deno.open("inter-italic.woff2");
+
+ return new Response(file.readable, {
+ headers: { "Content-Type": "font/woff2" },
+ });
+ }
+
+ return new Response(null, { status: 404 });
+ },
+} satisfies Deno.ServeDefaultExport;