Set Complex Key Values in a Cloudflare Workers KV Namespace

Share this video with your friends

Send Tweet

We've learned how to write and receive data from our database, but we've only done it with fairly simple values. Now we are going to see how to do the same thing but with complex key values. There are two ways of doing this. One is the default route where we just return the value back from our KV. The second is where one route takes in a name parameter and sets it as the value for a key. The second path is the one we are going to look at in this lesson.