cvsa/packages/backend/main.ts
2025-03-31 06:09:49 +08:00

20 lines
448 B
TypeScript

import { Hono } from "hono";
import { dbMiddleware } from "./database.ts";
import { rootHandler } from "./root.ts";
import { getSnapshotsHanlder } from "./snapshots.ts";
export const app = new Hono();
app.use('/video/*', dbMiddleware);
app.get("/", ...rootHandler);
app.get('/video/:id/snapshots', ...getSnapshotsHanlder);
const fetch = app.fetch;
export default {
fetch,
} satisfies Deno.ServeDefaultExport;
export const VERSION = "0.2.3";