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" },
},
);
}
👆 This is a val. Vals are TypeScript snippets of code, written in the browser and run on our servers. Create scheduled functions, email yourself, and persist small pieces of data — all from the browser.