@@ -10,7 +10,7 @@ When mounting the RivetKit router at a custom path, you **must** specify the sam
1010
1111``` typescript
1212// Setup the RivetKit app
13- const app = setup ({
13+ const registry = setup ({
1414 workers: { counter },
1515 // IMPORTANT: Must specify the same basePath where your router is mounted
1616 basePath: " /my-path"
@@ -45,7 +45,7 @@ honoApp.get("/", (c) => c.text("Welcome to my app!"));
4545honoApp .get (" /hello" , (c ) => c .text (" Hello, world!" ));
4646
4747// Setup the RivetKit app
48- const app = setup ({
48+ const registry = setup ({
4949 workers: { counter },
5050 // IMPORTANT: Must specify the same basePath where your router is mounted
5151 basePath: " /my-path"
@@ -58,7 +58,7 @@ const { router: workerRouter, WorkerHandler } = createRouter(app);
5858honoApp .route (" /my-path" , workerRouter );
5959
6060// Export the app type for client usage
61- export type App = typeof app ;
61+ export type Registry = typeof registry ;
6262
6363// IMPORTANT: Must export `WorkerHandler` as this exact name
6464export { honoApp as default , WorkerHandler };
@@ -121,7 +121,7 @@ honoApp.get("/", (c) => c.text("Welcome to my app!"));
121121honoApp .get (" /hello" , (c ) => c .text (" Hello, world!" ));
122122
123123// Setup the RivetKit app
124- const app = setup ({
124+ const registry = setup ({
125125 workers: { counter },
126126 // IMPORTANT: Must specify the same basePath where your router is mounted
127127 basePath: " /my-path"
@@ -134,7 +134,7 @@ const { router: workerRouter, injectWebSocket } = createRouter(app);
134134honoApp .route (" /my-path" , workerRouter );
135135
136136// Export the app type for client usage
137- export type App = typeof app ;
137+ export type Registry = typeof registry ;
138138
139139// Create server with the combined app
140140const server = serve ({
@@ -173,7 +173,7 @@ honoApp.get("/", (c) => c.text("Welcome to my app!"));
173173honoApp .get (" /hello" , (c ) => c .text (" Hello, world!" ));
174174
175175// Setup the RivetKit app
176- const app = setup ({
176+ const registry = setup ({
177177 workers: { counter },
178178 // IMPORTANT: Must specify the same basePath where your router is mounted
179179 basePath: " /my-path"
@@ -186,7 +186,7 @@ const { router: workerRouter, webSocketHandler } = createRouter(app);
186186honoApp .route (" /my-path" , workerRouter );
187187
188188// Export the app type for client usage
189- export type App = typeof app ;
189+ export type Registry = typeof registry ;
190190
191191// Create and start the server
192192export default {
0 commit comments