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/kv/get-started.mdx
+4-9Lines changed: 4 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -124,11 +124,11 @@ To create a KV namespace via Wrangler:
124
124
For this tutorial, use the binding name `BINDING_NAME`.
125
125
126
126
```sh
127
-
npx wrangler kv namespace create kv_binding_name
127
+
npx wrangler kv namespace create BINDING_NAME
128
128
```
129
129
130
130
```sh output
131
-
🌀 Creating namespace with title kv-tutorial-kv_binding_name
131
+
🌀 Creating namespace with title kv-tutorial-BINDING_NAME
132
132
✨ Success!
133
133
Add the following to your configuration file:
134
134
[[kv_namespaces]]
@@ -142,9 +142,6 @@ To create a KV namespace via Wrangler:
142
142
143
143
<Steps>
144
144
1. Go to [**Storage & Databases** > **KV**](https://dash.cloudflare.com/?to=/:account/workers/kv/namespaces).
145
-
146
-
147
-
148
145
2. Select **Create a namespace**.
149
146
3. Enter a name for your namespace. For this tutorial, use `kv_tutorial_namespace`.
150
147
4. Select **Add**.
@@ -197,7 +194,7 @@ Refer to [Environment](/kv/reference/environments/) for more information.
197
194
4. Scroll to **Bindings**, then select **Add**.
198
195
5. Select **KV namespace**.
199
196
6. Name your binding (`BINDING_NAME`) in **Variable name**, then select the KV namespace (`kv_tutorial_namespace`) you created in [step 2](/kv/get-started/#2-create-a-kv-namespace) from the dropdown menu.
200
-
7. Select **Deploy** to deploy your binding.
197
+
7. Select **Deploy** to deploy your binding.
201
198
</Steps>
202
199
</TabItem></Tabs>
203
200
@@ -390,7 +387,7 @@ The browser should simply return the `VALUE` corresponding to the `KEY` you have
390
387
1. Go to **Workers & Pages** > **Overview**.
391
388
2. Go to the `kv-tutorial` Worker you created.
392
389
3. Select **Edit Code**.
393
-
4. Clear the contents of the `workers.js` file, then paste the following code. Replace the `BINDING_NAME` with your binding name.
390
+
4. Clear the contents of the `workers.js` file, then paste the following code.
394
391
395
392
```js
396
393
exportdefault {
@@ -412,8 +409,6 @@ The browser should simply return the `VALUE` corresponding to the `KEY` you have
412
409
};
413
410
```
414
411
415
-
For this tutorial, your `BINDING_NAME` should be `kv_binding_name`.
416
-
417
412
The code above:
418
413
419
414
1. Writes a key to `BINDING_NAME` using KV's `put()` method.
0 commit comments