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
import { rpc } from "https://esm.town/v/std/rpc?v=5";
import { InStatement, sqlite } from "https://esm.town/v/std/sqlite?v=4";
export default rpc(async (statement: InStatement) => {
try {
const res = await sqlite.execute(statement);
return res[0];
} catch (e) {
throw new Response(e.message, {
status: 500,
});
}
});
pomdtr-execute.web.val.run
March 10, 2024