]> Repositories - ayoreis.com.git/blob - mod.ts
Add log section, with FFmpeg speed up snippet
[ayoreis.com.git] / mod.ts
1 export default {
2         async fetch(request) {
3                 const url = new URL(request.url);
4
5                 if (request.method === "GET" && url.pathname === "/") {
6                         const file = await Deno.open("index.html");
7
8                         return new Response(file.readable, {
9                                 headers: { "Content-Type": "text/html" },
10                         });
11                 }
12
13                 if (request.method === "GET" && url.pathname === "/favicon.svg") {
14                         const file = await Deno.open("favicon.svg");
15
16                         return new Response(file.readable, {
17                                 headers: { "Content-Type": "image/svg+xml" },
18                         });
19                 }
20
21                 if (request.method === "GET" && url.pathname === "/inter.woff2") {
22                         const file = await Deno.open("inter.woff2");
23
24                         return new Response(file.readable, {
25                                 headers: { "Content-Type": "font/woff2" },
26                         });
27                 }
28
29                 if (request.method === "GET" && url.pathname === "/inter-italic.woff2") {
30                         const file = await Deno.open("inter-italic.woff2");
31
32                         return new Response(file.readable, {
33                                 headers: { "Content-Type": "font/woff2" },
34                         });
35                 }
36
37                 return new Response(null, { status: 404 });
38         },
39 } satisfies Deno.ServeDefaultExport;