Skip to content

Commit be03e4a

Browse files
fix(init): add back static files (#3100)
1 parent 599973b commit be03e4a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

init/src/init.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,11 +360,13 @@ ${GRADIENT_CSS}`;
360360
// Skip this and be silent if there is a network issue.
361361
}
362362

363-
const MAIN_TS = `import { App, fsRoutes } from "fresh";
363+
const MAIN_TS = `import { App, fsRoutes, staticFiles } from "fresh";
364364
import { define, type State } from "./utils.ts";
365365
366366
export const app = new App<State>();
367367
368+
app.use(staticFiles());
369+
368370
// this is the same as the /api/:name route defined via a file. feel free to delete this!
369371
app.get("/api2/:name", (ctx) => {
370372
const name = ctx.params.name;

0 commit comments

Comments
 (0)