fix(init): add back static files (#3100)

This commit is contained in:
Marvin Hagemeister
2025-07-16 14:41:12 +02:00
committed by GitHub
parent 599973bb5c
commit be03e4a548
+3 -1
View File
@@ -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<State>();
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;