Skip to content

Commit 6258dcc

Browse files
committed
Adding main in Wrangler config files.
1 parent d91907a commit 6258dcc

File tree

9 files changed

+9
-1
lines changed

9 files changed

+9
-1
lines changed

src/content/docs/durable-objects/examples/alarms-api.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ Finally, configure your Wrangler file to include a Durable Object [binding](/dur
7979

8080
```toml title="wrangler.toml"
8181
name = "durable-object-alarm"
82+
main = "src/index.ts"
8283

8384
[[durable_objects.bindings]]
8485
name = "BATCHER"

src/content/docs/durable-objects/examples/build-a-counter.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ Finally, configure your Wrangler file to include a Durable Object [binding](/dur
171171

172172
```toml title="wrangler.toml"
173173
name = "my-counter"
174+
main = "src/index.ts"
174175

175176
[[durable_objects.bindings]]
176177
name = "COUNTERS"

src/content/docs/durable-objects/examples/build-a-rate-limiter.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ Finally, configure your Wrangler file to include a Durable Object [binding](/dur
283283

284284
```toml title="wrangler.toml"
285285
name = "my-counter"
286+
main = "src/index.ts"
286287

287288
[[durable_objects.bindings]]
288289
name = "RATE_LIMITER"

src/content/docs/durable-objects/examples/durable-object-in-memory-state.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ Finally, configure your Wrangler file to include a Durable Object [binding](/dur
7373

7474
```toml title="wrangler.toml"
7575
name = "durable-object-in-memory-state"
76+
main = "src/index.ts"
7677

7778
[[durable_objects.bindings]]
7879
name = "LOCATION"

src/content/docs/durable-objects/examples/durable-object-ttl.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ To test and deploy this example, configure your Wrangler file to include a Durab
102102

103103
```toml title="wrangler.toml"
104104
name = "durable-object-ttl"
105+
main = "src/index.ts"
105106

106107
[[durable_objects.bindings]]
107108
name = "MY_DURABLE_OBJECT"

src/content/docs/durable-objects/examples/use-kv-from-durable-objects.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Configure your Wrangler file as follows:
2727

2828
```toml
2929
name = "my-worker"
30+
main = "src/index.ts"
3031

3132
kv_namespaces = [
3233
{ binding = "YOUR_KV_NAMESPACE", id = "<id_of_your_namespace>" }

src/content/docs/durable-objects/examples/websocket-hibernation-server.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ Finally, configure your Wrangler file to include a Durable Object [binding](/dur
194194

195195
```toml title="wrangler.toml"
196196
name = "websocket-hibernation-server"
197+
main = "src/index.ts"
197198

198199
[[durable_objects.bindings]]
199200
name = "WEBSOCKET_HIBERNATION_SERVER"

src/content/docs/durable-objects/examples/websocket-server.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ Finally, configure your Wrangler file to include a Durable Object [binding](/dur
198198

199199
```toml title="wrangler.toml"
200200
name = "websocket-server"
201+
main = "src/index.ts"
201202

202203
[[durable_objects.bindings]]
203204
name = "WEBSOCKET_SERVER"

src/content/docs/durable-objects/tutorials/build-a-seat-booking-app/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ npm run dev
282282

283283
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/).
284284

285-
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:
285+
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:
286286

287287
<WranglerConfig>
288288

0 commit comments

Comments
 (0)