Code
HTTP
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 {
return await sqlite.execute(statement);
} catch (e) {
throw new Response(e.message, {
status: 500,
});
}
});
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!
sqlite-execute.web.val.run
Updated: March 11, 2024