@smuzi/http-server 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/router.d.ts +1 -0
- package/build/router.js +3 -6
- package/package.json +1 -1
package/build/router.d.ts
CHANGED
|
@@ -48,4 +48,5 @@ export declare function contactPaths(path1: PathParam, path2: PathParam): PathPa
|
|
|
48
48
|
export declare function toStartWithPattern(input: PathParam): RegExp;
|
|
49
49
|
export declare function methodFromString(method: string): Option<HttpMethod>;
|
|
50
50
|
export declare function CreateHttpRouter<Resp extends THttpResponse, GR extends Router<Resp>>(groupRoute: GroupRoute, notFound: Action<Resp>): Router<Resp>;
|
|
51
|
+
export declare function CreateHttp1Router(groupRoute: GroupRoute, notFound?: Action<ServerResponse>): Http1Router;
|
|
51
52
|
export {};
|
package/build/router.js
CHANGED
|
@@ -96,12 +96,9 @@ export function CreateHttpRouter(groupRoute, notFound) {
|
|
|
96
96
|
}
|
|
97
97
|
};
|
|
98
98
|
}
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
// ): Http1Router {
|
|
103
|
-
// return CreateHttpRouter<ServerResponse, Http1Router>(groupRoute, notFound);
|
|
104
|
-
// }
|
|
99
|
+
export function CreateHttp1Router(groupRoute, notFound = http1NotFoundHandler) {
|
|
100
|
+
return CreateHttpRouter(groupRoute, notFound);
|
|
101
|
+
}
|
|
105
102
|
// export function CreateHttp2Router(
|
|
106
103
|
// groupRoute: GroupRoute,
|
|
107
104
|
// notFound: Action<ServerHttp2Stream> = http2NotFoundHandler
|