fix: add http2

This commit is contained in:
2024-11-27 18:49:55 +08:00
parent e0c7d40a9c
commit c99d03550e
4 changed files with 25 additions and 19 deletions

View File

@@ -1,5 +1,5 @@
import { QueryRouter, Route, RouteContext, RouteOpts } from './route.ts';
import { Server, Cors } from './server/server.ts';
import { Server, Cors, ServerOpts } from './server/server.ts';
import { WsServer } from './server/ws-server.ts';
import { CustomError } from './result/error.ts';
@@ -10,14 +10,7 @@ type AppOptions<T = {}> = {
/** handle msg 关联 */
routerHandle?: RouterHandle;
routerContext?: RouteContext<T>;
serverOptions?: {
path?: string;
cors?: Cors;
handle?: any;
isHTTPS?: boolean;
httpsKey?: string;
httpsCert?: string;
};
serverOptions?: ServerOpts;
io?: boolean;
ioOpts?: { routerHandle?: RouterHandle; routerContext?: RouteContext<T>; path?: string };
};