simple list of pds servers with open registration
1import { Hono } from "https://esm.sh/hono@4.4.0";
2import { runMigrations } from "./database/migrations.ts";
3import { pages } from "./routes/pages.ts";
4import { api } from "./routes/api.ts";
5
6const app = new Hono();
7
8app.onError((err, _c) => {
9 throw err;
10});
11
12let migrationsRan = false;
13app.use("*", async (_c, next) => {
14 if (!migrationsRan) {
15 await runMigrations();
16 migrationsRan = true;
17 }
18 await next();
19});
20
21app.route("/api", api);
22app.route("/", pages);
23
24export default app.fetch;