29 comments

  • hk1337 7 minutes ago

    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?

  • simonw 3 hours ago

    6 comments already complaining that this isn't "simple".

    I suggest we instead treat this post as if the title was "Show HN: a simple text blog demonstrating how to use Cloudflare workers and KV store" - that way we get to have a more interesting conversation.

    • dang 2 hours ago

      Thanks—we've put that (more or less) in the title above.

      (Submitted title was 'Show HN: Simple Text Blog")

  • simonw 2 hours ago

    I tried this out and found it useful for exploring Cloudflare workers. One thing I learned: KV and durable objects are not the same thing. KV is eventually consistent, durable objects is the thing where all traffic has to be routed to the same node since it's dealing with a read/write store that has read-after-write guarantees.

    Also Cloudflare KV provides a simple dashboard interface for adding and removing KV entries: https://gist.github.com/simonw/1e072d04960616970381a433bfca7...

  • jumping_frog 2 hours ago

    I think what would be amazing is if WhatsApp creates a mobile number based website which anyone can access if they know the mobile number. Access through whatsapp mobile app.

    • bravura 17 minutes ago

      That's called a Telegram bot and you can write one yourself.

  • jagadeeshposni 5 hours ago

    I have been working on something similar this morning. I want to create a simple blog to document my thoughts without having to deal much about technical stuff and maintenance and spend a few hours diving the rabbit hole of jekyll blogs.

    While their documentation(https://jekyllrb.com/docs/) is one of the best resources to learn, I have found my job much more straightforward using one of the pre-built themes that is available on the internet. With deployment to github pages almost instantaneous, I can see myself updating the blog much more often.

    The blog which I am currently working on: https://jagadeeshposni.github.io The theme I have used: minimal mistakes

  • eggfriedrice an hour ago

    This is nice, apart from a quick play when they were new I've never really looked at CF Workers and KV again. This made me go and have a look at the docs and find that it's actually looks quite useful. I didn't know they'd added Python and other languages, so that's cool in itself.

    I like Jon's example here, a single and fairly short file that does just enough to demo this all, nice.

  • stavros an hour ago

    This is great, thanks! It's always useful to see these "here's how to do something useful with a new technology" demos, and I've been wondering how Cloudflare's offerings work exactly, so thanks!

    Now we need the equivalent thing for Durable Objects! Maybe a chat room, hm.

  • dang 2 hours ago

    [stub for offtopicness]

    • Eikon 4 hours ago

      What's simpler about this than just uploading .html files?

      This seems actually very complicated for what it does.

      • simonw 4 hours ago

        Just uploading HTML files won't teach you how to use Cloudflare workers and their KV store.

        • krapp 4 hours ago

          A "simple text blog" shouldn't need to use anything of the sort.

          • simonw 3 hours ago

            Sure, but you're getting hung up on the link title and not the actual substance.

            Imagine if the title was this instead: "Show HN: a simple text blog demonstrating how to use Cloudflare workers and KV store"

          • evbogue 3 hours ago

            Would simple text chatroom demand the kv?

            • krapp 3 hours ago

              No.

              • evbogue 3 hours ago

                Yah, I guess you could use WebRTC or some other way of exchanging messages now that I think about it.

                • krapp 2 hours ago

                  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.

                  • evbogue 2 hours ago

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

      • deafpolygon 4 hours ago

        I was going to say, just upload .txt

    • kissgyorgy 3 hours ago

      How is that simple?

      Simple would be if you would just write text files, drop it somewhere simple, either a webserver or GitHub pages or some hosted service, and be done with it.

    • zeroq 3 hours ago

      [flagged]

      • dang 2 hours ago

        "Please don't post shallow dismissals, especially of other people's work. A good critical comment teaches us something."

        https://news.ycombinator.com/newsguidelines.html

        • zeroq 38 minutes ago

          I'm sorry Dan, but whose work? His or the entire JS community as a whole? If the latter then yes, I'm guilty as charged, because I deeply believe that we went way too far and the fact that a few years old smartphone can't handle sites like LinkedIn is just ridiculous. If the former, then, like I've stated in my opening statement it's a cool experiment you can do over a weekend if you want to learn something new or brush off your skills but is it really worth calling a "blog engine" or place on 1st page of HN?

          • bravura 13 minutes ago

            It's quite a smear to write "He's probably unemployed at the moment or just brushing off before the next interview.". Cheap smears are a form of casual dismissal and devalue this site.

    • yakshaving_jgt 4 hours ago

      This is anything but simple.

      • lhousa 3 hours ago

        Suggestion: "plain text blog"