Skip to content

Commit 53addbe

Browse files
Apply suggestions from code review
Various small fixes Co-authored-by: Nikita Sharma <[email protected]>
1 parent fd6d4d3 commit 53addbe

File tree

9 files changed

+32
-32
lines changed

9 files changed

+32
-32
lines changed

src/content/docs/containers/architecture.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ extends Durable Objects with Container-specific APIs and helpers. We recommend u
4747
the [`Container` class documentation](/containers/container-package) for more details.
4848

4949
Each Durable Object is a globally routable isolate that can execute code and store state. This allows
50-
developers to easily address and route to specific container instances (no matter where they are placed)
50+
developers to easily address and route to specific container instances (no matter where they are placed),
5151
define and run hooks on container status changes, execute recurring checks on the instance, and store persistent
5252
state associated with each instance.
5353

src/content/docs/containers/beta-info.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ We plan to automatically reduce log noise in the future.
3838

3939
The dashboard will be updated to show:
4040

41-
- the status of Container rollouts.
41+
- the status of Container rollouts
4242
- links from Workers to their associated Containers
4343

4444
### Co-locating Durable Objects and Containers

src/content/docs/containers/examples/container-backend.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { WranglerConfig, Details } from "~/components";
1313
A common pattern is to serve a static frontend application (e.g., React, Vue, Svelte) using Static Assets,
1414
then pass backend requests to a containerized backend application.
1515

16-
In this example, we'll show an example using a simple index.html file served as a static asset,
16+
In this example, we'll show an example using a simple `index.html` file served as a static asset,
1717
but you can select from one of many frontend frameworks. See our [Workers framework examples](/workers/framework-guides/web-apps/) for more information.
1818

1919
For a full example, see the [Static Frontend + Container Backend Template](https://github.com/mikenomitch/static-frontend-container-backend).
@@ -123,7 +123,7 @@ Create a simple `index.html` file in the `./dist` directory.
123123
```
124124
</Details>
125125

126-
In this example, we are using [Alpine.js](https://alpinejs.dev/) to fetch a list of widgets from "/api/widgets".
126+
In this example, we are using [Alpine.js](https://alpinejs.dev/) to fetch a list of widgets from `/api/widgets`.
127127

128128
This is meant to be a very simple example, but you can get significantly more complex.
129129
See [examples of Workers integrating with frontend frameworks](/workers/framework-guides/web-apps/) for more information.
@@ -186,11 +186,11 @@ import (
186186
)
187187

188188
func handler(w http.ResponseWriter, r \*http.Request) {
189-
widgets := []map[string]interface{}{
190-
{"id": 1, "name": "Widget A"},
191-
{"id": 2, "name": "Sprocket B"},
192-
{"id": 3, "name": "Gear C"},
193-
}
189+
widgets := []map[string]interface{}{
190+
{"id": 1, "name": "Widget A"},
191+
{"id": 2, "name": "Sprocket B"},
192+
{"id": 3, "name": "Gear C"},
193+
}
194194

195195
w.Header().Set("Content-Type", "application/json")
196196
w.Header().Set("Access-Control-Allow-Origin", "*")
@@ -199,8 +199,8 @@ widgets := []map[string]interface{}{
199199
}
200200

201201
func main() {
202-
http.HandleFunc("/api/widgets", handler)
203-
log.Fatal(http.ListenAndServe(":8080", nil))
202+
http.HandleFunc("/api/widgets", handler)
203+
log.Fatal(http.ListenAndServe(":8080", nil))
204204
}
205205

206206
```

src/content/docs/containers/examples/env-vars-and-secrets.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ We'll assume that we've set additional secrets in the Secret Store.
115115

116116
```js
117117
export class MyContainer extends Container {
118-
defaultPort = 8080;
119-
sleepAfter = '10s';
118+
defaultPort = 8080;
119+
sleepAfter = '10s';
120120
manualStart = true;
121121
}
122122

src/content/docs/containers/faq.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ See [scaling & routing documentation](/containers/scaling-and-routing/) for deta
8686

8787
A cold start is when a container instance is started from a completely stopped state.
8888

89-
If you call `env.MY_CONTAINER.get(id)` with a completely novel ID, and launch
89+
If you call `env.MY_CONTAINER.get(id)` with a completely novel ID and launch
9090
this instance for the first time, it will result in a cold start.
9191

9292
This will start the container image from its entrypoint for the first time. Depending

src/content/docs/containers/index.mdx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ export class MyContainer extends Container {
5555
}
5656

5757
async fetch(request, env) {
58-
const { "session-id": sessionId } = await request.json();
59-
// Get the container instance for the given session ID
60-
const containerInstance = getContainer(env.MY_CONTAINER, sessionId)
61-
// Pass the request to the container instance on its default port
62-
return containerInstance.fetch(request);
58+
const { "session-id": sessionId } = await request.json();
59+
// Get the container instance for the given session ID
60+
const containerInstance = getContainer(env.MY_CONTAINER, sessionId)
61+
// Pass the request to the container instance on its default port
62+
return containerInstance.fetch(request);
6363
}
6464

65-
````
65+
```
6666
</TabItem>
6767
<TabItem label="Worker Config">
6868
<WranglerConfig>
@@ -96,7 +96,7 @@ async fetch(request, env) {
9696
}
9797
],
9898
}
99-
````
99+
```
100100

101101
</WranglerConfig>
102102
</TabItem>

src/content/docs/containers/platform-details.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@ This page containers general details about the Containers platform.
1313

1414
## Instance Types
1515

16-
Currently, Containers are configured with custom memory, vCPU, and disk space.
17-
On launch, there will be three instance types available for Containers users by default:
16+
The memory, vCPU, and disk space for Containers are set through predefined instance types.
17+
There are currently three instance types available for Containers users by default:
1818

19-
| Instance Type | Memory | vCPU | Disk |
20-
| ------------- | ------ | ---- | ---- |
21-
| dev | 256 MB | 1/16 | 2 GB |
22-
| basic | 1 GB | 1/4 | 4 GB |
23-
| standard | 4 GB | 1/2 | 4 GB |
19+
| Instance Type | Memory | vCPU | Disk |
20+
| ------------- | ------- | ---- | ---- |
21+
| dev | 256 MiB | 1/16 | 2 GB |
22+
| basic | 1 GiB | 1/4 | 4 GB |
23+
| standard | 4 GiB | 1/2 | 4 GB |
2424

25-
These will be specified using the `instance_type` property in wrangler config.
25+
These are specified using the `instance_type` property in wrangler config.
2626

2727
## Limits
2828

src/content/docs/containers/scaling-and-routing.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ class Backend extends Container {
4141
}
4242

4343
export default {
44-
async fetch(request: Request, env: Env): Promise<Response> {
44+
async fetch(request: Request, env: Env): Promise<Response> {
4545
// note: "getRandom" to be replaced with latency-aware routing in the near future
4646
const containerInstance = getRandom(env.BACKEND, INSTANCE_COUNT)
4747
return containerInstance.fetch(request);
48-
},
48+
},
4949
};
5050
```
5151

src/content/docs/workers/wrangler/configuration.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1090,7 +1090,7 @@ The following options are available:
10901090

10911091
- The instance type of the container. This determines the amount of memory, CPU, and disk given to the container
10921092
instance. The current options are `"dev"`, `"basic"`, and `"standard"`. The default is `"dev"`. For more information,
1093-
the see [instance types documentation](/containers/platform-details).
1093+
the see [instance types documentation](/containers/platform-details#instance-types).
10941094

10951095
- `max_instances` <Type text="string" /> <MetaInfo text="optional" />
10961096

0 commit comments

Comments
 (0)