Questions tagged [cloudflare-kv]

6 questions
1
vote
0 answers

How do I access KV values in Cloudflare react app

I am trying to read a KV from React App, but it won't work I've created a binding and if I try env.Name, the app throws an error with env not defined, So I tried the functions and I can see the functions route on the deployed app but then when I…
1
vote
1 answer

How to import Cloudflare KV Namespace Variable?

I'm using KV namespace defined in cargo.toml by adding to it the lines kv_namespaces = [ { binding = "SITE_DATA", id = "" } ] When I try to import the SITE_DATA variable in my Worker script as shown, and I run wrangler publish or…
0
votes
1 answer

Should I commit my wrangler.toml file with KV namespace values present?

I've created an API using Cloudflare Workers and it uses their KV service. The KV namespaces are defined in the wrangler.toml file but I'm unsure if it is safe to commit that file with the kv_namespaces values present. I've used the wrangler secrets…
Stephen Gilboy
  • 5,572
  • 2
  • 30
  • 36
0
votes
1 answer

On Cloudflare Pages KV, how do you seed values for KV keys

I have a Cloudflare Pages project with functions which used KV. I wish to test my functions with KV values that are seeded before the function is called. How do I do this?
Safa Alai
  • 1,223
  • 1
  • 15
  • 27
0
votes
1 answer

Cloudflare worker scheduled response API KV

So previously I tried to store KV when CRON was processed and it works. Now I tried to store KV based on API responses, and tried the following: https://gist.github.com/viggy28/522c4ed05e2bec051d3838ebaff27258 and Forward body from request to…
Shinjo
  • 677
  • 6
  • 22
0
votes
1 answer

How to dynamically create and delete namespaces in Cloudflare Workers KV

I am trying to create a mini database that may have to be dynamic in workers. I have a workers backend going and a couple kv namespaces. When the app is live I would like the ability to create a new space and then populate it or delete a namespace…
user17247718