···11+# ProtoRuns
22+33+Store your runs using ATProto! Log in with your bluesky handle (sorry) and start
44+saving and retrieving your runs.
55+66+Press the Remix button to start storing your own records on ATProto!
77+88+Demo available at:[ https://proto-runs.val.run/](https://proto-runs.val.run/)
+28
backend/index.ts
···11+import { serveFile } from "https://esm.town/v/std/utils@85-main/index.ts";
22+import { Hono } from "npm:hono";
33+import { getClientMetadata } from "../shared/client_metadata.ts";
44+55+const app = new Hono();
66+77+// Serve index.html at the root /
88+app.get("/", (_c) => {
99+ return serveFile("/frontend/index.html", import.meta.url);
1010+});
1111+1212+// Serve all /frontend files
1313+app.get("/frontend/**/*", (c) => serveFile(c.req.path, import.meta.url));
1414+app.get("/shared/**/*", (c) => serveFile(c.req.path, import.meta.url));
1515+app.get("/public/*", (c) => serveFile(c.req.path, import.meta.url));
1616+1717+app.get(
1818+ "/client_metadata.json",
1919+ (c) => c.json(getClientMetadata(`https://${new URL(c.req.url).hostname}`)),
2020+);
2121+2222+app.onError((err, _c) => {
2323+ throw err;
2424+});
2525+2626+// HTTP vals expect an exported "fetch handler"
2727+// This is how you "run the server" in Val Town with Hono
2828+export default app.fetch;