Skip to content
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
2 changes: 1 addition & 1 deletion clients/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import asyncio

async def main():
# Create a client connected to your RivetKit manager
client = ActorClient("http://localhost:6420")
client = ActorClient("http://localhost:8080")

# Connect to a chat room actor
chat_room = await client.get("chat-room", tags=[("room", "general")])
Expand Down
2 changes: 1 addition & 1 deletion clients/rust/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use serde_json::json;
async fn main() -> anyhow::Result<()> {
// Create a client connected to your RivetKit manager
let client = Client::new(
"http://localhost:6420",
"http://localhost:8080",
TransportKind::Sse,
EncodingKind::Json
);
Expand Down
4 changes: 2 additions & 2 deletions docs/actors/actions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Calling actions from the client is simple:
import { createClient } from "rivetkit/client";
import type { App } from "./src/index";

const client = createClient<App>("http://localhost:6420");
const client = createClient<App>("http://localhost:8080");
const counter = await client.counter.get();
const result = await counter.increment(42);
console.log(result); // The value returned by the action
Expand Down Expand Up @@ -114,7 +114,7 @@ export type Registry = typeof registry;
import { createClient } from "rivetkit/client";
import type { App } from "./src/index";

const client = createClient<App>("http://localhost:6420");
const client = createClient<App>("http://localhost:8080");

// Type-safe client usage
const counter = await client.counter.get();
Expand Down
2 changes: 1 addition & 1 deletion docs/actors/connections.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const gameRoom = actor({
import { createClient } from "rivetkit/client";
import type { App } from "./src/index";

const client = createClient<App>("http://localhost:6420");
const client = createClient<App>("http://localhost:8080");
const gameRoom = await client.gameRoom.get({
params: { authToken: "supersekure" }
});
Expand Down
8 changes: 4 additions & 4 deletions docs/actors/events.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const chatRoom = actor({
import { createClient } from "rivetkit/client";
import type { App } from "./src/index";

const client = createClient<App>("http://localhost:6420");
const client = createClient<App>("http://localhost:8080");
const chatRoom = await client.chatRoom.get();
await chatRoom.sendMessage('Hello, world!');
```
Expand Down Expand Up @@ -67,7 +67,7 @@ const chatRoom = actor({
import { createClient } from "rivetkit/client";
import type { App } from "./src/index";

const client = createClient<App>("http://localhost:6420");
const client = createClient<App>("http://localhost:8080");
const chatRoom = await client.chatRoom.get();
await chatRoom.sendPrivateMessage(123, 'Hello, world!');
```
Expand All @@ -90,7 +90,7 @@ Clients can subscribe to events that will happen repeatedly using `actor.on(name
import { createClient } from "rivetkit/client";
import type { App } from "./src/index";

const client = createClient<App>("http://localhost:6420");
const client = createClient<App>("http://localhost:8080");
const chatRoom = await client.chatRoom.get();

chatRoom.on('newMessage', ({ message }) => {
Expand Down Expand Up @@ -125,7 +125,7 @@ Clients can listen for an event only one time with `actor.once(name, callback)`.
import { createClient } from "rivetkit/client";
import type { App } from "./src/index";

const client = createClient<App>("http://localhost:6420");
const client = createClient<App>("http://localhost:8080");
const chatRoom = await client.chatRoom.get();

chatRoom.once('joinRequestApproved', () => {
Expand Down
2 changes: 1 addition & 1 deletion docs/actors/metadata.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default chatRoom;
import { createClient } from "rivetkit/client";
import type { App } from "./src/index";

const client = createClient<App>("http://localhost:6420");
const client = createClient<App>("http://localhost:8080");

// Connect to a specific channel
const randomChannel = await client.chatRoom.get({ channel: "random" });
Expand Down
2 changes: 1 addition & 1 deletion docs/actors/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ await client.chatRoom.get({ channel: "random" });
import { createClient } from "rivetkit/client";
import type { App } from "./src/index";

const client = createClient<App>("http://localhost:6420");
const client = createClient<App>("http://localhost:8080");

// Game room with ID parameter
const gameRoom = await client.gameRoom.get({ roomId: "ABC123" });
Expand Down
2 changes: 1 addition & 1 deletion docs/actors/quickstart-frontend.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ import { useState } from "react";
import { createClient, createRivetKit } from "@rivetkit/react";
import type { Registry } from "../backend/registry";

const client = createClient<Registry>(`http://localhost:6420/registry`);
const client = createClient<Registry>(`http://localhost:8080/registry`);
const { useActor } = createRivetKit(client);

function App() {
Expand Down
2 changes: 1 addition & 1 deletion docs/clients/javascript.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ The RivetKit JavaScript client allows you to connect to and interact with actors

async function main() {
// Replace with your endpoint URL after deployment
const client = createClient<App>("http://localhost:6420");
const client = createClient<App>("http://localhost:8080");

// Get or create a actor instance
const counter = await client.counter.get();
Expand Down
4 changes: 2 additions & 2 deletions docs/clients/python.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ The RivetKit Python client provides a way to connect to and interact with actors

async def main():
# Replace with your endpoint URL after deployment
client = AsyncClient("http://localhost:6420")
client = AsyncClient("http://localhost:8080")

# Get or create a actor instance
counter = await client.get("counter")
Expand Down Expand Up @@ -80,7 +80,7 @@ The RivetKit Python client provides a way to connect to and interact with actors
from rivetkit_client import Client

# Replace with your endpoint URL after deployment
client = Client("http://localhost:6420")
client = Client("http://localhost:8080")

# Get or create a actor instance
counter = client.get("counter")
Expand Down
2 changes: 1 addition & 1 deletion docs/clients/rust.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ The RivetKit Rust client provides a way to connect to and interact with actors f
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Replace with your endpoint URL after deployment
let client = Client::new(
"http://localhost:6420",
"http://localhost:8080",
TransportKind::Sse,
EncodingKind::Json
);
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/edge.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The region a actor is created in can be overridden using region options:
import { createClient } from "rivetkit/client";
import type { App } from "./src/index";

const client = createClient<App>("http://localhost:6420");
const client = createClient<App>("http://localhost:8080");

// Create actor in a specific region
const actor = await client.example.get({
Expand Down
4 changes: 2 additions & 2 deletions docs/concepts/interacting-with-workers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use rivetkit_client::{Client, EncodingKind, GetOrCreateOptions, TransportKind};

// Create a client with connection address and configuration
let client = Client::new(
"http://localhost:6420", // Connection address
"http://localhost:8080", // Connection address
TransportKind::WebSocket, // Transport (WebSocket or SSE)
EncodingKind::Cbor, // Encoding (Json or Cbor)
);
Expand All @@ -33,7 +33,7 @@ let client = Client::new(
from rivetkit_client import AsyncClient as ActorClient

# Create a client with the connection address
client = ActorClient("http://localhost:6420")
client = ActorClient("http://localhost:8080")
```
</CodeGroup>

Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ await client.chatRoom.get({ channel: "random" });
import { createClient } from "rivetkit/client";
import type { App } from "./src/index";

const client = createClient<App>("http://localhost:6420");
const client = createClient<App>("http://localhost:8080");

// Game room with ID parameter
const gameRoom = await client.gameRoom.get({ roomId: "ABC123" });
Expand Down
4 changes: 2 additions & 2 deletions docs/frameworks/react.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ Learn how to create realtime, stateful React applications with RivetKit's actor
import React, { useState } from "react";

// Replace with your endpoint URL after deployment
const client = createClient<App>("http://localhost:6420");
const client = createClient<App>("http://localhost:8080");
const { useActor, useActorEvent } = createReactRivetKit(client);

function App() {
Expand Down Expand Up @@ -218,7 +218,7 @@ import type { App } from "../actors/app";
import { useState } from "react";

// Connect to RivetKit
const client = createClient<App>("http://localhost:6420");
const client = createClient<App>("http://localhost:8080");
const { useActor, useActorEvent } = createReactRivetKit(client);

function Counter() {
Expand Down
10 changes: 5 additions & 5 deletions docs/integrations/hono.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,13 @@ export type Registry = typeof registry;
// Create server with the combined app
const server = serve({
fetch: honoApp.fetch,
port: 6420,
port: 8080,
});

// IMPORTANT: Inject the websocket handler into the server
injectWebSocket(server);

console.log("Server running at http://localhost:6420");
console.log("Server running at http://localhost:8080");
```

Make sure to update your client connection URL to include the custom path:
Expand All @@ -155,7 +155,7 @@ Make sure to update your client connection URL to include the custom path:
import { createClient } from "rivetkit/client";
import type { App } from "./src/index";

const client = createClient<App>("http://localhost:6420/my-path");
const client = createClient<App>("http://localhost:8080/my-path");
```

### Bun
Expand Down Expand Up @@ -190,7 +190,7 @@ export type Registry = typeof registry;

// Create and start the server
export default {
port: 6420,
port: 8080,
fetch: honoApp.fetch,
// IMPORTANT: Pass the webSocketHandler to Bun
websocket: webSocketHandler,
Expand All @@ -204,5 +204,5 @@ Make sure to update your client connection URL to include the custom path:
import { createClient } from "rivetkit/client";
import type { App } from "./src/index";

const client = createClient<App>("http://localhost:6420/my-path");
const client = createClient<App>("http://localhost:8080/my-path");
```
2 changes: 1 addition & 1 deletion docs/snippets/examples/ai-agent-react.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useState, useEffect } from "react";
import type { App } from "../actors/app";
import type { Message } from "./actor";

const client = createClient<App>("http://localhost:6420");
const client = createClient<App>("http://localhost:8080");
const { useActor, useActorEvent } = createReactRivetKit(client);

export function AIAssistant() {
Expand Down
2 changes: 1 addition & 1 deletion docs/snippets/examples/chat-room-react.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useState, useEffect } from "react";
import type { App } from "../actors/app";
import type { Message } from "./actor";

const client = createClient<App>("http://localhost:6420");
const client = createClient<App>("http://localhost:8080");
const { useActor, useActorEvent } = createReactRivetKit(client);

export function ChatRoom({ roomId = "general" }) {
Expand Down
2 changes: 1 addition & 1 deletion docs/snippets/examples/crdt-react.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import * as Y from 'yjs';
import { applyUpdate, encodeStateAsUpdate } from 'yjs';
import type { App } from "../actors/app";

const client = createClient<App>("http://localhost:6420");
const client = createClient<App>("http://localhost:8080");
const { useActor, useActorEvent } = createReactRivetKit(client);

export function YjsEditor({ documentId = "shared-doc" }) {
Expand Down
2 changes: 1 addition & 1 deletion docs/snippets/examples/database-react.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { createClient } from "rivetkit/client";
import { createReactRivetKit } from "@rivetkit/react";
import { useState, useEffect } from "react";

const client = createClient("http://localhost:6420");
const client = createClient("http://localhost:8080");
const { useActor, useActorEvent } = createReactRivetKit(client);

export function NotesApp({ userId }: { userId: string }) {
Expand Down
2 changes: 1 addition & 1 deletion docs/snippets/examples/document-react.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { createReactRivetKit } from "@rivetkit/react";
import { useState, useEffect } from "react";
import type { App } from "../actors/app";

const client = createClient<App>("http://localhost:6420");
const client = createClient<App>("http://localhost:8080");
const { useActor, useActorEvent } = createReactRivetKit(client);

export function DocumentEditor() {
Expand Down
2 changes: 1 addition & 1 deletion docs/snippets/examples/game-react.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { createReactRivetKit } from "@rivetkit/react";
import { useState, useEffect, useRef } from "react";
import type { Player } from "./actor";

const client = createClient("http://localhost:6420");
const client = createClient("http://localhost:8080");
const { useActor, useActorEvent } = createReactRivetKit(client);

export function MultiplayerGame() {
Expand Down
2 changes: 1 addition & 1 deletion docs/snippets/examples/rate-react.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { createReactRivetKit } from "@rivetkit/react";
import { useState } from "react";
import type { App } from "../actors/app";

const client = createClient<App>("http://localhost:6420");
const client = createClient<App>("http://localhost:8080");
const { useActor } = createReactRivetKit(client);

export function RateLimiter() {
Expand Down
2 changes: 1 addition & 1 deletion docs/snippets/examples/stream-react.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useState, useEffect } from "react";
import type { App } from "../actors/app";
import type { StreamState } from "./actor"; // Import shared types from actor

const client = createClient<App>("http://localhost:6420");
const client = createClient<App>("http://localhost:8080");
const { useActor, useActorEvent } = createReactRivetKit(client);

export function StreamExample() {
Expand Down
2 changes: 1 addition & 1 deletion docs/snippets/examples/sync-react.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { createReactRivetKit } from "@rivetkit/react";
import { useState, useEffect, useRef } from "react";
import type { Contact } from "./actor";

const client = createClient("http://localhost:6420");
const client = createClient("http://localhost:8080");
const { useActor, useActorEvent } = createReactRivetKit(client);

export function ContactsApp() {
Expand Down
2 changes: 1 addition & 1 deletion docs/snippets/examples/tenant-react.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useState, useEffect } from "react";
import type { App } from "../actors/app";

// Create client and hooks
const client = createClient<App>("http://localhost:6420");
const client = createClient<App>("http://localhost:8080");
const { useActor } = createReactRivetKit(client);

export function OrgDashboard({ orgId }: { orgId: string }) {
Expand Down
4 changes: 2 additions & 2 deletions examples/better-auth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ npm install
npm run dev
```

Open your browser to `http://localhost:5173` to see the frontend and the backend will be running on `http://localhost:6420`.
Open your browser to `http://localhost:5173` to see the frontend and the backend will be running on `http://localhost:8080`.

## Features

Expand All @@ -52,4 +52,4 @@ Open your browser to `http://localhost:5173` to see the frontend and the backend

## License

Apache 2.0
Apache 2.0
4 changes: 2 additions & 2 deletions examples/better-auth/src/backend/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@
// }
// });
//
// serve({ fetch: app.fetch, port: 6420 }, () =>
// console.log("Listening at http://localhost:6420"),
// serve({ fetch: app.fetch, port: 8080 }, () =>
// console.log("Listening at http://localhost:8080"),
// );
2 changes: 1 addition & 1 deletion examples/better-auth/src/frontend/auth-client.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// import { createAuthClient } from "better-auth/react";
//
// export const authClient = createAuthClient({
// baseURL: "http://localhost:6420",
// baseURL: "http://localhost:8080",
// });
4 changes: 2 additions & 2 deletions examples/better-auth/src/frontend/components/ChatRoom.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { createClient, createRivetKit } from "@rivetkit/react";
import { authClient } from "../auth-client";
import type { Registry } from "../../backend/registry";

const client = createClient<Registry>("http://localhost:6420/registry", {
const client = createClient<Registry>("http://localhost:8080/registry", {
transport: "sse",
});

Expand Down Expand Up @@ -156,4 +156,4 @@ export function ChatRoom({ user, onSignOut }: ChatRoomProps) {
</div>
</div>
);
}
}
2 changes: 1 addition & 1 deletion examples/chat-room/scripts/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ async function main() {
const { username, room } = await initPrompt();

// Create type-aware client
const client = createClient<Registry>("http://localhost:6420");
const client = createClient<Registry>("http://localhost:8080");

// connect to chat room - now accessed via property
// can still pass parameters like room
Expand Down
2 changes: 1 addition & 1 deletion examples/chat-room/scripts/connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { Registry } from "../actors/registry";

async function main() {
// Create type-aware client
const client = createClient<Registry>(process.env.ENDPOINT ?? "http://localhost:6420");
const client = createClient<Registry>(process.env.ENDPOINT ?? "http://localhost:8080");

// connect to chat room - now accessed via property
const chatRoom = client.chatRoom.getOrCreate().connect();
Expand Down
Loading
Loading