diff --git a/rivetkit-typescript/packages/rivetkit/src/registry/mod.ts b/rivetkit-typescript/packages/rivetkit/src/registry/mod.ts index f9f18d8900..24622a5518 100644 --- a/rivetkit-typescript/packages/rivetkit/src/registry/mod.ts +++ b/rivetkit-typescript/packages/rivetkit/src/registry/mod.ts @@ -220,7 +220,7 @@ export class Registry { // Start server if (!config.disableDefaultServer) { const serverPromise = (async () => { - const out = await crossPlatformServe(config, hono, undefined); + const out = await crossPlatformServe(config, hono); upgradeWebSocket = out.upgradeWebSocket; })(); readyPromises.push(serverPromise); diff --git a/rivetkit-typescript/packages/rivetkit/src/registry/serve.ts b/rivetkit-typescript/packages/rivetkit/src/registry/serve.ts index 0aaaa18990..00093b133d 100644 --- a/rivetkit-typescript/packages/rivetkit/src/registry/serve.ts +++ b/rivetkit-typescript/packages/rivetkit/src/registry/serve.ts @@ -1,14 +1,11 @@ -import { Hono } from "hono"; +import type { Hono } from "hono"; import { logger } from "./log"; import type { RunnerConfig } from "./run-config"; export async function crossPlatformServe( runConfig: RunnerConfig, - rivetKitRouter: Hono, - userRouter: Hono | undefined, + app: Hono, ) { - const app = userRouter ?? new Hono(); - // Import @hono/node-server using string variable to prevent static analysis const nodeServerModule = "@hono/node-server"; let serve: any; @@ -25,10 +22,6 @@ export async function crossPlatformServe( process.exit(1); } - // Mount registry - // app.route("/registry", rivetKitRouter); - app.route("/", rivetKitRouter); - // Import @hono/node-ws using string variable to prevent static analysis const nodeWsModule = "@hono/node-ws"; let createNodeWebSocket: any; @@ -47,7 +40,7 @@ export async function crossPlatformServe( // Inject WS const { injectWebSocket, upgradeWebSocket } = createNodeWebSocket({ - app, + app: app, }); // Start server