You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/browser-rendering/workers-binding-api/browser-rendering-with-DO.mdx
+6-14Lines changed: 6 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,23 +34,15 @@ Create a new Worker project named `browser-worker` by running:
34
34
args={"browser-worker"}
35
35
/>
36
36
37
-
## 2. Enable Durable Objects in the dashboard
38
-
39
-
To enable Durable Objects, you will need to purchase the Workers Paid plan:
40
-
41
-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/), and select your account.
42
-
2. Go to **Workers & Pages** > **Plans**.
43
-
3. Select **Purchase Workers Paid** and complete the payment process to enable Durable Objects.
44
-
45
-
## 3. Install Puppeteer
37
+
## 2. Install Puppeteer
46
38
47
39
In your `browser-worker` directory, install Cloudflare’s [fork of Puppeteer](/browser-rendering/platform/puppeteer/):
48
40
49
41
```sh
50
42
npm install @cloudflare/puppeteer --save-dev
51
43
```
52
44
53
-
## 4. Create a R2 bucket
45
+
## 3. Create a R2 bucket
54
46
55
47
Create two R2 buckets, one for production, and one for development.
56
48
@@ -69,7 +61,7 @@ wrangler r2 bucket list
69
61
70
62
After running the `list` command, you will see all bucket names, including the ones you have just created.
71
63
72
-
## 5. Configure your Wrangler configuration file
64
+
## 4. Configure your Wrangler configuration file
73
65
74
66
Configure your `browser-worker` project's [Wrangler configuration file](/workers/wrangler/configuration/) by adding a browser [binding](/workers/runtime-apis/bindings/) and a [Node.js compatibility flag](/workers/configuration/compatibility-flags/#nodejs-compatibility-flag). Browser bindings allow for communication between a Worker and a headless browser which allows you to do actions such as taking a screenshot, generating a PDF and more.
75
67
@@ -107,7 +99,7 @@ new_classes = ["Browser"] # Array of new classes
107
99
108
100
</WranglerConfig>
109
101
110
-
## 6. Code
102
+
## 5. Code
111
103
112
104
The code below uses Durable Object to instantiate a browser using Puppeteer. It then opens a series of web pages with different resolutions, takes a screenshot of each, and uploads it to R2.
113
105
@@ -220,11 +212,11 @@ export class Browser {
220
212
}
221
213
```
222
214
223
-
## 7. Test
215
+
## 6. Test
224
216
225
217
Run [`npx wrangler dev --remote`](/workers/wrangler/commands/#dev) to test your Worker remotely before deploying to Cloudflare's global network. Local mode support does not exist for Browser Rendering so `--remote` is required.
226
218
227
-
## 8. Deploy
219
+
## 7. Deploy
228
220
229
221
Run [`npx wrangler deploy`](/workers/wrangler/commands/#deploy) to deploy your Worker to the Cloudflare global network.
Durable Objects limits are the same as [Workers Limits](/workers/platform/limits/), as well as the following limits that are specific to Durable Objects:
12
12
13
-
| Feature | Limit for class with key-value storage backend | Limit for class with SQLite storage backend [^1]|
| Number of Objects | Unlimited (within an account or of a given class) | Unlimited (within an account or of a given class) |
16
16
| Maximum Durable Object namespaces | 500 (identical to the [script limit](/workers/platform/limits/)) | 500 (identical to the [script limit](/workers/platform/limits/)) |
17
17
| Storage per account | 50 GB (can be raised by contacting Cloudflare) [^2]| 50 GB (can be raised by contacting Cloudflare) [^2]|
@@ -32,15 +32,15 @@ Durable Objects limits are the same as [Workers Limits](/workers/platform/limits
32
32
33
33
For Durable Object classes with [SQLite storage backend](/durable-objects/best-practices/access-durable-objects-storage/#sqlite-storage-backend) these SQL limits apply:
Copy file name to clipboardExpand all lines: src/content/release-notes/hyperdrive.yaml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -90,6 +90,6 @@ entries:
90
90
- publish_date: "2023-09-28"
91
91
title: Hyperdrive now available
92
92
description: |-
93
-
Hyperdrive is now available in public beta to any developer with a Workers paid plan.
93
+
Hyperdrive is now available in public beta to any developer with a Workers Paid plan.
94
94
95
95
To start using Hyperdrive, visit the [get started](/hyperdrive/get-started/) guide or read the [announcement blog](https://blog.cloudflare.com/hyperdrive-making-regional-databases-feel-distributed/) to learn more.
0 commit comments