Public
HTTP (deprecated)
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import { render } from "https://deno.land/x/resvg_wasm/mod.ts";
import svgCard from "./svg_card";
export default async function(req: Request): Promise<Response> {
const params = Object.fromEntries(new URL(req.url).searchParams);
const svg = svgCard(params);
const png = await render(svg);
return new Response(png, {
headers: {
"Content-Type": "image/png",
},
});
}
jxnblk-png_card.web.val.run
May 3, 2024