1
2
3
4
5
6
7
import { blob } from "https://esm.town/v/std/blob?v=11";
export default async function(req: Request): Promise<Response> {
const count = (await blob.getJSON("blobCounter") ?? 0) + 1;
await blob.setJSON("blobCounter", count);
return Response.json(count);
}
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
stevekrouse-blobcounter.web.val.run
v2
March 11, 2024