1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | import { Hono } from "hono";
import { logger } from "hono/logger";
import { cors } from "hono/cors";
import gitRoutes from "./routes/git";
import apiRoutes from "./routes/api";
import webRoutes from "./routes/web";
const app = new Hono();
// Middleware
app.use("*", logger());
app.use("/api/*", cors());
// Git Smart HTTP protocol routes (must be before web routes)
app.route("/", gitRoutes);
// REST API
app.route("/", apiRoutes);
// Web UI (catch-all, must be last)
app.route("/", webRoutes);
export default app;
|