refactor: centralize server into ServerContext (#26)
This commit centralizes all server related logic into a central ServerContext class.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import { ComponentType } from "../runtime/deps.ts";
|
||||
import { router } from "./deps.ts";
|
||||
import { PageProps } from "../runtime/types.ts";
|
||||
|
||||
export interface PageModule {
|
||||
default: ComponentType<PageProps>;
|
||||
}
|
||||
|
||||
export interface Page {
|
||||
route: string;
|
||||
url: string;
|
||||
name: string;
|
||||
component: ComponentType<PageProps>;
|
||||
}
|
||||
|
||||
export interface ApiRouteModule {
|
||||
default: router.MatchHandler;
|
||||
}
|
||||
|
||||
export interface ApiRoute {
|
||||
route: string;
|
||||
url: string;
|
||||
name: string;
|
||||
handler: router.MatchHandler;
|
||||
}
|
||||
Reference in New Issue
Block a user