import { serve } from "@hono/node-server"; import { Hono } from "hono"; import { createClient } from "@libsql/client"; import { drizzle } from "drizzle-orm/libsql"; import { groupTable } from "./db/schema.js"; import authRouter, { getSession, LoginForm } from "./auth.js"; export const RP_ID = "localhost"; // "uneven.0m.nu"; export const ORIGIN = `http://${RP_ID}`; let app = new Hono(); export let db = drizzle(createClient({ url: "file:data.db" })); async function Groups() { let result = await db.select().from(groupTable).all(); return ; } app.get("/", c => c.html( Uneven )); let colors = ["red", "green", "blue"]; app.get("/button", async c => { let session = await getSession(c); return c.html( ); }); app.route("/auth", authRouter); serve({ fetch: app.fetch, port: 80, }, info => console.log(`Server is running on http://localhost:${info.port}`));