Skip to content

Commit 9f99d83

Browse files
fix(init): add back static files
1 parent 599973b commit 9f99d83

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

init/src/init.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,10 +360,12 @@ ${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
366-
export const app = new App<State>();
366+
export const app = new App<State>()
367+
368+
app.use(staticFiles());
367369
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) => {

0 commit comments

Comments
 (0)