From f6d637fa76fc812f67eb3a8986f2163a51b75e38 Mon Sep 17 00:00:00 2001 From: Thomas Gauvin <35609369+thomasgauvin@users.noreply.github.com> Date: Tue, 1 Jul 2025 16:15:00 -0400 Subject: [PATCH] Update index.mdx --- src/content/docs/kv/index.mdx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/content/docs/kv/index.mdx b/src/content/docs/kv/index.mdx index 3773ca68ce21485..56df1c961836aaf 100644 --- a/src/content/docs/kv/index.mdx +++ b/src/content/docs/kv/index.mdx @@ -43,16 +43,16 @@ Access your Workers KV namespace from Cloudflare Workers using [Workers Bindings export default { async fetch(request, env, ctx): Promise { // write a key-value pair - await env.KV_BINDING.put('KEY', 'VALUE'); + await env.KV.put('KEY', 'VALUE'); // read a key-value pair - const value = await env.KV_BINDING.get('KEY'); + const value = await env.KV.get('KEY'); // list all key-value pairs - const allKeys = await env.KV_BINDING.list(); + const allKeys = await env.KV.list(); // delete a key-value pair - await env.KV_BINDING.delete('KEY'); + await env.KV.delete('KEY'); // return a Workers response return new Response( @@ -63,7 +63,7 @@ export default { ); }, -} satisfies ExportedHandler<{ KV_BINDING: KVNamespace }>; +} satisfies ExportedHandler<{ KV: KVNamespace }>; ``` @@ -81,7 +81,7 @@ export default { "kv_namespaces": [ { - "binding": "KV_BINDING", + "binding": "KV", "id": "" } ]