Comment

Comment by chilling

You are right. It just should be like so:

Get:

   const likes = (await kv.hget(postTitle, "likes")) || 0
Post:

   const likes = await kv.hincrby(postTitle, "likes", 1);
parent chilling 2 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton