feat: add support for middleware (#74)

This commit is contained in:
Luca Casonato
2021-11-01 13:35:41 +01:00
committed by GitHub
parent 6ecd7a680b
commit aa1e1bcdb4
7 changed files with 57 additions and 15 deletions
+2 -2
View File
@@ -1,12 +1,12 @@
import { ServerContext } from "./context.ts";
import { listenAndServe } from "./deps.ts";
import { PageModule, RendererModule } from "./types.ts";
import { MiddlewareModule, PageModule, RendererModule } from "./types.ts";
export type { Handler, HandlerContext, Handlers } from "./types.ts";
export { RenderContext } from "./render.tsx";
export type { RenderFn } from "./render.tsx";
export interface Routes {
pages: Record<string, PageModule | RendererModule>;
pages: Record<string, PageModule | RendererModule | MiddlewareModule>;
baseUrl: string;
}