cvsa/packages/backend/main.ts
alikia2x a2b55d0900
feat: root path for API
improve: the GET video snapshots API
2025-03-31 05:07:22 +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.0";