From be03e4a5484520812132597422d59ecfb05acd27 Mon Sep 17 00:00:00 2001 From: Marvin Hagemeister Date: Wed, 16 Jul 2025 14:41:12 +0200 Subject: [PATCH] fix(init): add back static files (#3100) --- init/src/init.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/init/src/init.ts b/init/src/init.ts index 2fe9e6ec..ba6186a6 100644 --- a/init/src/init.ts +++ b/init/src/init.ts @@ -360,11 +360,13 @@ ${GRADIENT_CSS}`; // Skip this and be silent if there is a network issue. } - const MAIN_TS = `import { App, fsRoutes } from "fresh"; + const MAIN_TS = `import { App, fsRoutes, staticFiles } from "fresh"; import { define, type State } from "./utils.ts"; export const app = new App(); +app.use(staticFiles()); + // this is the same as the /api/:name route defined via a file. feel free to delete this! app.get("/api2/:name", (ctx) => { const name = ctx.params.name;