fix(init): add back static files (#3100)
This commit is contained in:
+3
-1
@@ -360,11 +360,13 @@ ${GRADIENT_CSS}`;
|
|||||||
// Skip this and be silent if there is a network issue.
|
// 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";
|
import { define, type State } from "./utils.ts";
|
||||||
|
|
||||||
export const app = new App<State>();
|
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!
|
// this is the same as the /api/:name route defined via a file. feel free to delete this!
|
||||||
app.get("/api2/:name", (ctx) => {
|
app.get("/api2/:name", (ctx) => {
|
||||||
const name = ctx.params.name;
|
const name = ctx.params.name;
|
||||||
|
|||||||
Reference in New Issue
Block a user