Skip to content
This repository was archived by the owner on Oct 22, 2025. It is now read-only.

Commit 0a8dd91

Browse files
committed
chore: rename "app" -> "registry"
1 parent 0fef372 commit 0a8dd91

File tree

90 files changed

+485
-432
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+485
-432
lines changed

docs/concepts/cors.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ Cross-Origin Resource Sharing (CORS) is a security mechanism that allows a web a
88

99
You'll need to configure CORS when:
1010

11-
- **Local Development:** You're developing locally and your client runs on a different port than your worker service
12-
- **Different Domain:** Your frontend application is hosted on a different domain than your worker service
11+
- **Local Development**: You're developing locally and your client runs on a different port than your worker service
12+
- **Different Domain**: Your frontend application is hosted on a different domain than your worker service
1313

1414
## Example
1515

1616
```ts
1717
import { setup } from "rivetkit";
1818
import counter from "./counter";
1919

20-
const app = setup({
20+
const registry = setup({
2121
workers: { counter },
2222
// Change this to match your frontend's origin
2323
cors: { origin: "https://yourdomain.com" }

docs/concepts/overview.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,15 @@ import { setup, serve } from "rivetkit";
5757
import chatRoom from "./chat_room";
5858

5959
// Create the application
60-
const app = setup({
60+
const registry = setup({
6161
workers: { chatRoom }
6262
});
6363

6464
// Start serving on default port
65-
serve(app);
65+
serve(registry);
6666

6767
// Export the app type for client usage
68-
export type App = typeof app;
68+
export type Registry = typeof registry;
6969
```
7070

7171
## Key Worker Components

docs/concepts/testing.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ const myWorker = worker({
5858
}
5959
});
6060

61-
export const app = setup({
61+
export const registry = setup({
6262
workers: { myWorker }
6363
});
6464

65-
export type App = typeof app;
65+
export type Registry = typeof registry;
6666
```
6767
</CodeGroup>
6868

@@ -108,11 +108,11 @@ const counter = worker({
108108
}
109109
});
110110

111-
export const app = setup({
111+
export const registry = setup({
112112
workers: { counter }
113113
});
114114

115-
export type App = typeof app;
115+
export type Registry = typeof registry;
116116
```
117117
</CodeGroup>
118118

@@ -163,12 +163,12 @@ export const chatRoom = worker({
163163
});
164164

165165
// Create and export the app
166-
export const app = setup({
166+
export const registry = setup({
167167
workers: { chatRoom }
168168
});
169169

170170
// Export type for client type checking
171-
export type App = typeof app;
171+
export type Registry = typeof registry;
172172
```
173173
</CodeGroup>
174174

@@ -224,11 +224,11 @@ const scheduler = worker({
224224
}
225225
});
226226

227-
export const app = setup({
227+
export const registry = setup({
228228
workers: { scheduler }
229229
});
230230

231-
export type App = typeof app;
231+
export type Registry = typeof registry;
232232
```
233233
</CodeGroup>
234234

docs/integrations/hono.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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!"));
4545
honoApp.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);
5858
honoApp.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
6464
export { honoApp as default, WorkerHandler };
@@ -121,7 +121,7 @@ honoApp.get("/", (c) => c.text("Welcome to my app!"));
121121
honoApp.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);
134134
honoApp.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
140140
const server = serve({
@@ -173,7 +173,7 @@ honoApp.get("/", (c) => c.text("Welcome to my app!"));
173173
honoApp.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);
186186
honoApp.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
192192
export default {

docs/integrations/resend.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ const user = worker({
5151
},
5252
});
5353

54-
export const app = setup({ workers: { user } });
55-
export type App = typeof app;
54+
export const registry = setup({ workers: { user } });
55+
export type Registry = typeof registry;
5656
```
5757
</Step>
5858

docs/llm/prompt.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ When importing from workspace packages, always check the package's `package.json
134134

135135
## Worker Management
136136

137-
- App is configured with workers using `setup({ workers: { workerName }})` followed by `serve(app)`
137+
- App is configured with workers using `setup({ workers: { workerName }})` followed by `serve(registry)`
138138
- Workers are accessed by client using `client.workerName.get()`
139139
- Workers can pass an ID parameter or object with `client.workerName.get(id)` or `client.workerName.get({key: value})`
140140
- Workers can be shut down with `c.shutdown()` from within the worker

docs/openapi.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,4 +325,4 @@
325325
}
326326
}
327327
}
328-
}
328+
}

docs/platforms/bun.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Bun provides a fast runtime environment for running RivetKit, with excellent per
3333
import { app } from "../workers/app";
3434

3535
// Start the server with file-system driver (default)
36-
serve(app);
36+
serve(registry);
3737
```
3838
</Step>
3939

docs/platforms/nodejs.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Node.js provides a robust environment for running RivetKit, ideal for developmen
4747
import { app } from "../workers/app";
4848

4949
// Start the server with file-system driver (default)
50-
serve(app);
50+
serve(registry);
5151
```
5252
</Step>
5353

docs/snippets/setup-actor.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ const counter = worker({
1414
});
1515

1616
// Create the application
17-
export const app = setup({
17+
export const registry = setup({
1818
workers: { counter },
1919
cors: { origin: "http://localhost:8080" }
2020
});
2121

2222
// Export app type for client usage
23-
export type App = typeof app;
23+
export type Registry = typeof registry;
2424
```
2525

0 commit comments

Comments
 (0)