From d0c1c7be9c7a4448a3324341de844c554b16487d Mon Sep 17 00:00:00 2001 From: stringsplit <77242831+nbitzz@users.noreply.github.com> Date: Sat, 9 Mar 2024 17:27:42 -0800 Subject: [PATCH] port /:fileId --- src/server/index.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/server/index.ts b/src/server/index.ts index 3d32eaa..f281ceb 100644 --- a/src/server/index.ts +++ b/src/server/index.ts @@ -86,6 +86,9 @@ apiRouter.loadAPIMethods().then(() => { app.route("/", apiRouter.root) console.log("API OK!") + // moved here to ensure it's matched last + app.get("/:fileId", (ctx) => app.fetch(ctx.req.raw, ctx.env, ctx.executionCtx)) + // listen on 3000 or MONOFILE_PORT // moved here to prevent a crash if someone manages to access monofile before api routes are mounted