in web/index.ts [56:75]
async fetch(req) {
const url = new URL(req.url);
if (url.pathname === "/") {
return new Response(html, {
headers: { "Content-Type": "text/html" },
});
} else if (url.pathname === "/images/logo_white_bg.png") {
const imageFile = file("images/logo_white_bg.png");
return new Response(imageFile, {
headers: { "Content-Type": "image/png" },
});
} else if (url.pathname === "/images/browser.png") {
const faviconFile = file("images/browser.png");
return new Response(faviconFile, {
headers: { "Content-Type": "image/png" },
});
} else {
return new Response("Not Found", { status: 404 });
}
},