async (req)=>{ if (!val) { const { hostname } = new URL(req.url); if (!hostname.endsWith(".web.val.run")) { return new Response(null, { status: 500 }); } const subdomain = hostname.split(".")[0]; const [author, name] = subdomain.split("-"); val = { author, name }; } if (!title) { title = `@${val.author}/${val.name}`; } const { code, readme } = await api(`/v1/alias/${val.author}/${val.name}`); return html(await gfm(readme, { title, favicon: "📝" })); }