Blame · Line-by-line history
app.ts
Each line is annotated with the commit that last touched it. Click any SHA to jump to that commit and see the surrounding change.
| fc1817a | 1 | import { Hono } from "hono"; |
| 2 | import { logger } from "hono/logger"; | |
| 3 | import { cors } from "hono/cors"; | |
| 4 | import gitRoutes from "./routes/git"; | |
| 5 | import apiRoutes from "./routes/api"; | |
| 6 | import webRoutes from "./routes/web"; | |
| 7 | ||
| 8 | const app = new Hono(); | |
| 9 | ||
| 10 | // Middleware | |
| 11 | app.use("*", logger()); | |
| 12 | app.use("/api/*", cors()); | |
| 13 | ||
| 14 | // Git Smart HTTP protocol routes (must be before web routes) | |
| 15 | app.route("/", gitRoutes); | |
| 16 | ||
| 17 | // REST API | |
| 18 | app.route("/", apiRoutes); | |
| 19 | ||
| 20 | // Web UI (catch-all, must be last) | |
| 21 | app.route("/", webRoutes); | |
| 22 | ||
| 23 | export default app; |