Add features: custom server and websocket. Minor refactoring
This commit is contained in:
+3
-1
@@ -1,4 +1,4 @@
|
||||
import type { MatchedRoute, Server } from "bun";
|
||||
import type { MatchedRoute, ServeOptions, Server, WebSocketHandler } from "bun";
|
||||
import type { FC, JSX, ReactNode } from "react";
|
||||
|
||||
export type ServerProps = {
|
||||
@@ -52,6 +52,8 @@ export type BunextConfig = {
|
||||
params: BunextConfigMiddlewareParams,
|
||||
) => Promise<Response | undefined> | Response | undefined;
|
||||
defaultCacheExpiry?: number;
|
||||
websocket?: WebSocketHandler<any>;
|
||||
serverOptions?: ServeOptions;
|
||||
};
|
||||
|
||||
export type BunextConfigMiddlewareParams = {
|
||||
|
||||
Reference in New Issue
Block a user