From a7ad3a5c1dce62c91f2f3aad39c8315273f1f619 Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Thu, 29 Jan 2026 18:31:32 -0800 Subject: [PATCH] router: true --- src/index.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index 6ff6106..1bf03d7 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -24,6 +24,7 @@ export type HypeProps = { reset?: boolean prettyHTML?: boolean layout?: boolean + router?: boolean } export type SSEHandler = ( @@ -44,7 +45,8 @@ export class Hype< super(props) this.props = props ?? {} - this.registerMiddleware() + if (!this.router) + this.registerMiddleware() } sse(path: string, handler: SSEHandler) { @@ -240,4 +242,4 @@ function findAvailablePort(startPort: number, maxAttempts = 100): number { function render404(c: Context) { return c.text('File not found', 404) -} \ No newline at end of file +}