feat: add static file support (#58)
This commit adds support for serving static files. Static can be placed into the `/static` directory (as a sibling of the `/pages` directory).
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { start } from "../../server.ts";
|
||||
import routes from "./routes.gen.ts";
|
||||
|
||||
start(routes);
|
||||
await start(routes);
|
||||
|
||||
+3
-2
@@ -1,8 +1,9 @@
|
||||
import { router as r, ServerContext } from "../server.ts";
|
||||
import { ServerContext } from "../server.ts";
|
||||
import { assert, assertEquals, assertStringIncludes } from "./deps.ts";
|
||||
import routes from "./fixture/routes.gen.ts";
|
||||
|
||||
const router = r.router(ServerContext.fromRoutes(routes).routes());
|
||||
const ctx = await ServerContext.fromRoutes(routes);
|
||||
const router = ctx.handler();
|
||||
|
||||
Deno.test("/ page prerender", async () => {
|
||||
const resp = await router(new Request("https://fresh.deno.dev/"));
|
||||
|
||||
Reference in New Issue
Block a user