Skip to content

I have created the exact API for my account pivotbianalytics.com but i cannot deploy cloudflare pages #11527

@PojoBAGH2025

Description

@PojoBAGH2025

What versions & operating system are you using?

// Add this to your wrangler.jsonc
"kv_namespaces": [
{
"binding": "KV",
"id": "a3e5d61525bc4b26b7783f0c3afe7cd8",

  // Optional: preview_id used when running `wrangler dev` for local dev
  "preview_id": "<ID_OF_PREVIEW_KV_NAMESPACE_FOR_LOCAL_DEVELOPMENT>"
}

]

Please provide a link to a minimal reproduction

a3e5d61525bc4b26b7783f0c3afe7cd8

Describe the Bug

export default {
async fetch(request, env, ctx) {
// write a key-value pair
await env.KV.put('KEY', 'VALUE');

// read a key-value pair
const value = await env.KV.get('KEY');

// list all key-value pairs
const allKeys = await env.KV.list();

// delete a key-value pair
await env.KV.delete('KEY');

// return a Workers response
return new Response(
  JSON.stringify({
    value: value,
    allKeys: allKeys,
  }),
);

}
}

Please provide any relevant error logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    Status

    Untriaged

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions