add rest api routes for threads, messages

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-10 11:33:13 +01:00
parent 8b1cb7e07f
commit a6b09df0a4
3 changed files with 103 additions and 0 deletions
+6
View File
@@ -1,5 +1,9 @@
import { Hono } from "hono";
import { cors } from "hono/cors";
import { emailRoutes } from "./routes/emails";
import { createDatabase } from "./db/index";
const db = createDatabase(process.env.DB_PATH ?? "magnumopus.db");
const app = new Hono();
@@ -7,6 +11,8 @@ app.use("*", cors());
app.get("/health", (c) => c.json({ status: "ok" }));
app.route("/api", emailRoutes(db));
export default {
port: Number(process.env.PORT ?? 3000),
fetch: app.fetch,