News for hackers. Stuff that matters.
Re:Adding view count and like button to 11ty by chilling on Monday June 24, 2024 @01:14AM (#40772798)
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);

There are no comments on this comment yet.