pomdtr-vanplateexample.web.val.run
Readme

Example of building html using the mini-van lib.

Access it at https://pomdtr-vanPlateExample.web.val.run

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
export async function vanPlateExample(req: Request) {
const { default: van } = await import(
"https://deno.land/x/minivan@0.3.9/src/van-plate.js"
);
const { a, body, li, p, ul } = van.tags;
return new Response(
van.html(
body(
p("Your user-agent is: ", req.headers.get("user-agent") ?? "Unknown"),
p("👋Hello"),
ul(li("🗺️World"), li(a({ href: "https://vanjs.org/" }, "🍦VanJS"))),
),
),
{
status: 200,
headers: { "content-type": "text/html; charset=utf-8" },
},
);
}
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!
v11
October 23, 2023