Live data from Hacker News

Show HN: A text-only blog engine using Cloudflare workers and KV store

github.com

41–50 of 54 posts

Re: Show HN: A text-only blog engine using Cloudflare workers and KV store

#41
post #31

I like it but not that enthusiastic about JavaScript echoing html. What about having simple html templates that call back to the worker for the posts and the worker return json?

Yeah it is gross interweaving html fragments randomly but I wanted to see if I could do it and keep it all constrained to one file. Thanks for the feedback.

Re: Show HN: A text-only blog engine using Cloudflare workers and KV store

#43

What is the pricing structure on this? I am sure there is a free-tier, but if we skip that and pretend we are paying for it from the beginning. How would much 100.000 hits be? I presume it would be a tiny number, A esp given the current content in the blog. so lets imagine some photos and heavier content. How difficult would it be to extend with with CF CDN?

For workers, free is 100k hits per day and 10ms of CPU per hit. KV is 100k reads, 1k writes, 1k deletes, 1k lists and 1GB storage. The subscription is 5 USD a month, including 10M hits at 30ms each, 10M w, 1M r, 1M d, 1M l, and also 1GB. One of the examples in their page (for a fully dynamic website, which is worst case) is: Subscription $5.00 Requests $1.50 (15,000,000 requests - 10,000,000 included requests) / 1,00…

I'll stick my static website on a $3.50 VPS then, and have no practical limits and a fixed price. Also soo much simpler.

Re: Show HN: A text-only blog engine using Cloudflare workers and KV store

#44
post #22
post #21

Earlier quoted context omitted.

You don't even need realtime. You can get away with just having people POST to a backend, updating a database and letting people refresh the page.

Why do all that when you could have the server write simple text files to the disk?

You need interaction for a chatroom, so you at least need a form somewhere.

Re: Show HN: A text-only blog engine using Cloudflare workers and KV store

#45
Thought this was really cool, so I reimplemented[0] it in Val Town[1] using their blob storage[2]. Mine's a bit longer because of I got a little more elaborate but it was a fun exercise.

[0] https://www.val.town/v/nbbaier/simpletext

[1] https://www.val.town/

[2] https://docs.val.town/std/blob/

Re: Show HN: A text-only blog engine using Cloudflare workers and KV store

#46
post #44
post #22

Earlier quoted context omitted.

Why do all that when you could have the server write simple text files to the disk?

You need interaction for a chatroom, so you at least need a form somewhere.

This is genius. But can we add an input field for the username?

Re: Show HN: A text-only blog engine using Cloudflare workers and KV store

#47
post #45

Thought this was really cool, so I reimplemented[0] it in Val Town[1] using their blob storage[2]. Mine's a bit longer because of I got a little more elaborate but it was a fun exercise. [0] https://www.val.town/v/nbbaier/simpletext [1] https://www.val.town/ [2] https://docs.val.town/std/blob/

That's awesome, never heard of val town so I'm going to have a closer look.

Re: Show HN: A text-only blog engine using Cloudflare workers and KV store

#48
post #47
post #45

Thought this was really cool, so I reimplemented[0] it in Val Town[1] using their blob storage[2]. Mine's a bit longer because of I got a little more elaborate but it was a fun exercise. [0] https://www.val.town/v/nbbaier/simpletext [1] https://www.val.town/ [2] https://docs.val.town/std/blob/

That's awesome, never heard of val town so I'm going to have a closer look.

It's a really great platform! My favorite place to experiment

Re: Show HN: A text-only blog engine using Cloudflare workers and KV store

#49
post #37

Earlier quoted context omitted.

I'd have thought the SQLite database (D1) would be a more obvious fit for a blog?

Good point, I'm making my way through exploring more of CF so I'll likely try a D1 variant of this. Ta

I have been very impressed with what you can build on it.

I built this little service to add UK specific political location data to Action Network CRM. 300 lines for the actual service!

code here: https://github.com/jms301/ANUpdaterUK/blob/main/src/index.js

Sure it's only taking a webhook, reading an API, looking up a db entry and then updating via API.

But just knowing it's running on someone else's infra and there's so little code to validate is very comforting.

Prior to this I had a version running on a VPS and yeah I can do it. But you end up with a LOT of code / config to run the web server, the queue, the database... And any of that could be introducing bugs and security problems.

Post reply on HN