File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -403,6 +403,7 @@ ${GRADIENT_CSS}`;
403403import { define, type State } from "./utils.ts";
404404
405405export const app = new App<State>();
406+
406407app.use(staticFiles());
407408
408409// this is the same as the /api/:name route defined via a file. feel free to delete this!
@@ -421,7 +422,6 @@ const exampleLoggerMiddleware = define.middleware((ctx) => {
421422app.use(exampleLoggerMiddleware);
422423
423424await fsRoutes(app, {
424- dir: "./",
425425 loadIsland: (path) => import(\`./islands/\${path}\`),
426426 loadRoute: (path) => import(\`./routes/\${path}\`),
427427});
Original file line number Diff line number Diff line change @@ -47,6 +47,12 @@ function isFreshFile<State>(mod: any): mod is FreshFsItem<State> {
4747}
4848
4949export interface FsRoutesOptions {
50+ /**
51+ * Parent directory for the `/routes` and `/islands` folders.
52+ *
53+ * By default, the `root` config option of the provided app is used.
54+ * @default app.config.root
55+ */
5056 dir ?: string ;
5157 ignoreFilePattern ?: RegExp [ ] ;
5258 loadRoute : ( path : string ) => Promise < unknown > ;
You can’t perform that action at this time.
0 commit comments