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
15
16
17
18
import { sqlite } from "https://esm.town/v/std/sqlite?v=4";
/*
const result = await sqlite.execute(`
CREATE TABLE plugin_stats (
name TEXT,
t TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
install_count NUMBER,
like_count NUMBER,
view_count NUMBER
)`);
*/
export const handler = async () => {
return Response.json(
await sqlite.execute(`SELECT * FROM plugin_stats;`),
);
};
tmcw-untitled_beigeelephant.web.val.run
February 15, 2024