From 923c7c6b1a6549a6c5012713a22d5cf6e478f994 Mon Sep 17 00:00:00 2001 From: Mathias Magnusson Date: Thu, 14 Aug 2025 15:11:23 +0200 Subject: Set up htmx & drizzle+libsql --- src/index.tsx | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 src/index.tsx (limited to 'src/index.tsx') diff --git a/src/index.tsx b/src/index.tsx new file mode 100644 index 0000000..c72d766 --- /dev/null +++ b/src/index.tsx @@ -0,0 +1,45 @@ +import { serve } from "@hono/node-server"; +import { Hono } from "hono"; +import { createClient } from "@libsql/client"; +import { drizzle } from "drizzle-orm/libsql"; +import { groupsTable } from "./db/schema.js"; + +const app = new Hono(); +const db = drizzle(createClient({ url: "file:data.db" })); + +async function Groups() { + const result = await db.select().from(groupsTable).all(); + + return ; +} + +app.get("/", c => c.html( + + + + + + Uneven + + + + + + +)); + +let colors = ["red", "green", "blue"]; +app.get("/button", c => c.html( + +)); + +serve({ + fetch: app.fetch, + port: 3000, +}, info => console.log(`Server is running on http://localhost:${info.port}`)); -- cgit v1.2.3