Skip to content
This repository was archived by the owner on Oct 22, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion examples/ai-agent/src/backend/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { registry } from "./registry";

registry.start({
cors: {
origin: "http://localhost:5173",
origin: "http://localhost:3000",
credentials: true,
},
});
7 changes: 6 additions & 1 deletion examples/better-auth-external-db/src/backend/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ import { auth } from "./auth";
import { registry } from "./registry";

// Start RivetKit
registry.start();
registry.start({
cors: {
origin: "http://localhost:5173",
credentials: true,
},
});

// Setup router
const app = new Hono();
Expand Down
3 changes: 2 additions & 1 deletion examples/crdt/src/backend/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { registry } from "./registry";

registry.start({
cors: {
origin: "http://localhost:5173",
origin: "http://localhost:3000",
credentials: true,
},
});
3 changes: 2 additions & 1 deletion examples/database/src/backend/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { registry } from "./registry";

registry.start({
cors: {
origin: "http://localhost:5173",
origin: "http://localhost:3000",
credentials: true,
},
});
3 changes: 2 additions & 1 deletion examples/game/src/backend/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { registry } from "./registry";

registry.start({
cors: {
origin: "http://localhost:5173",
origin: "http://localhost:3000",
credentials: true,
},
});
1 change: 1 addition & 0 deletions examples/hono-bun/src/backend/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const { client, fetch } = registry.start({
getUpgradeWebSocket: () => upgradeWebSocket,
cors: {
origin: "http://localhost:5173",
credentials: true,
},
});

Expand Down
1 change: 1 addition & 0 deletions examples/hono-react/src/backend/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { registry } from "./registry";
const { client } = registry.start({
cors: {
origin: "http://localhost:5173",
credentials: true,
},
});

Expand Down
3 changes: 2 additions & 1 deletion examples/rate/src/backend/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { registry } from "./registry";

registry.start({
cors: {
origin: "http://localhost:5173",
origin: "http://localhost:3000",
credentials: true,
},
});
8 changes: 7 additions & 1 deletion examples/raw-fetch-handler/src/backend/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,20 @@ import { cors } from "hono/cors";
import { registry } from "./registry";

// Start RivetKit
const { client } = registry.start();
const { client } = registry.start({
cors: {
origin: "http://localhost:5173",
credentials: true,
},
});

// Setup router
const app = new Hono();

app.use(
cors({
origin: "http://localhost:5173",
credentials: true,
}),
);

Expand Down
7 changes: 6 additions & 1 deletion examples/raw-websocket-handler-proxy/src/backend/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ import { createNodeWebSocket } from "@hono/node-ws";
import { Hono } from "hono";
import { registry } from "./registry.js";

const { client } = registry.start();
const { client } = registry.start({
cors: {
origin: "http://localhost:5173",
credentials: true,
},
});

const app = new Hono();
const { injectWebSocket, upgradeWebSocket } = createNodeWebSocket({ app });
Expand Down
1 change: 1 addition & 0 deletions examples/react/src/backend/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ import { registry } from "./registry";
registry.start({
cors: {
origin: "http://localhost:5173",
credentials: true,
},
});
3 changes: 2 additions & 1 deletion examples/stream/src/backend/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { registry } from "./registry";

registry.start({
cors: {
origin: "http://localhost:5173",
origin: "http://localhost:3000",
credentials: true,
},
});
3 changes: 2 additions & 1 deletion examples/sync/src/backend/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { registry } from "./registry";

registry.start({
cors: {
origin: "http://localhost:5173",
origin: "http://localhost:3000",
credentials: true,
},
});
3 changes: 2 additions & 1 deletion examples/tenant/src/backend/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { registry } from "./registry";

registry.start({
cors: {
origin: "http://localhost:5173",
origin: "http://localhost:3000",
credentials: true,
},
});
Loading