vladimyr-codeonvaltown_test.web.val.run
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { extractValInfo } from "https://esm.town/v/pomdtr/extractValInfo?v=26";
import { modifyFetchHandler } from "https://esm.town/v/vladimyr/codeOnValTown";
const { author, name } = extractValInfo(import.meta.url);
async function serveHtml(req: Request): Promise<Response> {
return new Response(
`
<html>
<head>
<title>test</title>
</head>
<body>
<p><code>@vladimyr/codeOnValTown modifyFetchHandler</code> test</p>
</body>
</html>
`,
{ headers: { "content-type": "text/html" } },
);
}
// export default modifyFetchHandler(serveHtml, { val: { handle: author, name } });
export default modifyFetchHandler(serveHtml);
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
v6
March 7, 2024