1
2
3
4
5
6
7
8
9
10
11
12
13
import { createClient } from "https://esm.sh/@libsql/client/web";
import process from "node:process";
let client = createClient({
url: "libsql://grateful-lanolin-stevekrouse.turso.io",
authToken: process.env.tursoGratefulLanolin,
});
export const todo_db_repl = await client.execute(`CREATE TABLE IF NOT EXISTS todos (
id INTEGER PRIMARY KEY AUTOINCREMENT,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
text TEXT NOT NULL
)`);
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!
November 1, 2023