How do I get all entries out of Deno.kv
Apologies if this is covered somewhere, I have tried searching through the history.
I have the following data (see pic)
I want to get all "subscribers" so that I can list them out but I seem to be coming up short with what I am trying which is below
The only thing I can think of is that my keys are actually
["subscribers","uuid"
but I do not know how to get around that!
Thanks in advance for any guidance / pointers on the above! Really enjoying using Deno + Fresh!7 Replies
Hmm so deploying it, it seems to work but when running locally, I get no data.
Is that to be expected?
silly Q: do you have local KV data? You can connect to the remote KV DB if needed
Hey Wes! Not a silly question as I am most definitely not using any local KV data, I didn't even realise that was a thing (naively) - I've been using Turso lately and my brain was just used to having it connected without thinking about it π
Connecting to the remove URL would be good! I assume there is some docs for that for me to look at?
I've found an example of conntecting to remote data when opening the KV store. I guess my only question is, is it fine to leave it in there or will it break something with the connection when deployed?
Nope itβs fine just make sure you know you are dealing with production data locally
Awesome cheers!
np! I'm using KV for this site to log number of times people use fav icons, and I have to connect to the remote KV every now and then because people are running up the numbers π€£ https://fav.farm/
I am always in need of a random favicon π love this!
I did in fact, run into a few problems Wes π
Managed to set the
DENO_KV_ACCESS_TOKEN
which made everything work locally but when I deployed it, it fell over. I could not add the same token to the project as DENO_
is a reserved key word.