Skip to content
Merged
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
1 change: 1 addition & 0 deletions src/content/docs/durable-objects/examples/alarms-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ Finally, configure your Wrangler file to include a Durable Object [binding](/dur

```toml title="wrangler.toml"
name = "durable-object-alarm"
main = "src/index.ts"

[[durable_objects.bindings]]
name = "BATCHER"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ Finally, configure your Wrangler file to include a Durable Object [binding](/dur

```toml title="wrangler.toml"
name = "my-counter"
main = "src/index.ts"

[[durable_objects.bindings]]
name = "COUNTERS"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,7 @@ Finally, configure your Wrangler file to include a Durable Object [binding](/dur

```toml title="wrangler.toml"
name = "my-counter"
main = "src/index.ts"

[[durable_objects.bindings]]
name = "RATE_LIMITER"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ Finally, configure your Wrangler file to include a Durable Object [binding](/dur

```toml title="wrangler.toml"
name = "durable-object-in-memory-state"
main = "src/index.ts"

[[durable_objects.bindings]]
name = "LOCATION"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ To test and deploy this example, configure your Wrangler file to include a Durab

```toml title="wrangler.toml"
name = "durable-object-ttl"
main = "src/index.ts"

[[durable_objects.bindings]]
name = "MY_DURABLE_OBJECT"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Configure your Wrangler file as follows:

```toml
name = "my-worker"
main = "src/index.ts"

kv_namespaces = [
{ binding = "YOUR_KV_NAMESPACE", id = "<id_of_your_namespace>" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ Finally, configure your Wrangler file to include a Durable Object [binding](/dur

```toml title="wrangler.toml"
name = "websocket-hibernation-server"
main = "src/index.ts"

[[durable_objects.bindings]]
name = "WEBSOCKET_HIBERNATION_SERVER"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ Finally, configure your Wrangler file to include a Durable Object [binding](/dur

```toml title="wrangler.toml"
name = "websocket-server"
main = "src/index.ts"

[[durable_objects.bindings]]
name = "WEBSOCKET_SERVER"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ npm run dev

The application already has the binding for the Durable Objects class configured in the [Wrangler configuration file](/workers/wrangler/configuration/). If you update the name of the Durable Objects class in `src/index.ts`, make sure to also update the binding in the [Wrangler configuration file](/workers/wrangler/configuration/).

1. Update the binding to use the SQLite storage in Durable Objects. In the [Wrangler configuration file](/workers/wrangler/configuration/), replace `new_classes=["Flight"]` with `new_sqlite_classes=["Flight"]`, `name = "FLIGHT"` with `name = "FLIGHT"`, and `class_name = "MyDurableObject"` with `class_name = "Flight"`. your [Wrangler configuration file](/workers/wrangler/configuration/) should look like this:
1. Update the binding to use the SQLite storage in Durable Objects. In the [Wrangler configuration file](/workers/wrangler/configuration/), replace `new_classes=["Flight"]` with `new_sqlite_classes=["Flight"]`, `name = "FLIGHT"` with `name = "FLIGHT"`, and `class_name = "MyDurableObject"` with `class_name = "Flight"`. your [Wrangler configuration file](/workers/wrangler/configuration/) should look similar to this:

<WranglerConfig>

Expand Down