Live data from Hacker News

Cloudflare Pages: Best server tech since CGI-bin?

taras.glek.net

51–60 of 226 posts

Re: Cloudflare Pages: Best server tech since CGI-bin?

#51

What is really annoying is that Cloudflare pages will strip the file extension off of your html pages, and perform permanent redirects to those new URLs. Now if you're intending on moving to a new hosting service that doesn't do that (cgi-bin), all Google search results to your site will 404. Github pages and likely others also supports this format, so moving between those two services doesn't exhibit this problem. M…

I exactly ran into this issue when migrating from a different provider to CF pages.

I preferred to strip away the .html extensions anyway, so it was okay in my case. CF should trigger a HTTP 308 for older .html to the new urls automatically.

Re: Cloudflare Pages: Best server tech since CGI-bin?

#52

Earlier quoted context omitted.

I’m happily using CloudFlare pages. The reason I haven’t tried Netlify is that after the free tier everything seems a little overpriced. I didn’t go for Vercel because I don’t want to use Next.js and I’m afraid I’ll run across some limitation because of this. I was already using Cloudflare as a CDN for S3 and GitHub pages, and their offerings seem to be growing quickly and wanting to compete with Amazon rather than t…

Vercel is pretty good as a generic static hosting. I run a handful of next.js, solid.js or vanilla html websites. Can't think of anything next.js specific you miss out on, you can just configure anything in a vercel.json file.

If you don't want to deal with any of that but like MDX (think Markdown with the option of JavaScript), I believe motif.land publishes your MDX sites with Vercel.

Re: Cloudflare Pages: Best server tech since CGI-bin?

#53

The Cloudflare cloud experience is "being sold short by subpar documentation" right now because important elements of their ecosystem are being ramped up from beta status. They also have internal docs which aren't kept up to date with their actual product. I'd check back in a few months because their beta experience can be very touch-and-go.

Agreed. One area where it's maybe not sold short but just hurting the UX; it's not immediately clear from their documentation that certain NextJS features you get 'automatically' on Netlify/Vercel just aren't supported yet. For example, using any kind of dynamic routing (i.e. going to `/books/:id` directly rather than clicking through) doesn't work yet as there's no router available to tackle this for you. According to their Discord, it's in the works but it has been in that state for a few months already.

You can work around this with some Workers that capture the dynamic routes, request the nextjs html file and return that, but then you're using up your Functions quota as well.

Re: Cloudflare Pages: Best server tech since CGI-bin?

#54
post #49

Side note: As someone who wanted a high level overview of Durable Objects, the Cloudflare announcement page 404s https://blog.cloudflare.com/introducing-workers-durable-obje...

Thanks for catching this. Not sure what happened exactly but jiggling the handle (republishing the post) seems to have fixed it.

Yup, and thank you for fixing it!

Re: Cloudflare Pages: Best server tech since CGI-bin?

#56

How does using GPT-3 make the types more visible? Feels futuristic but also incomprehensible to me. > As a shortcut, I used GPT-3 to generate a basic typescript function for me. This let me look at TS type definitions and get a better idea of what’s available so I could get developing.

Hope the author responds, because that stuck out to me too!

My assumption was that their prompt was something like "typescript cloudflare function" and they just used the resultant code to see types in action inside their IDE.

Re: Cloudflare Pages: Best server tech since CGI-bin?

#57
post #4

I feel like there's a large class of tools in this space now (Vercel, Netlify) that do all of this and more, and this post is less about Cloudflare Pages and more about the (really good) state of static hosting these days? One thing that stuck out was the comment about "Twitter cards", since Vercel/Next now has this built in: https://twitter.com/vercel/status/1579561293069316096

Static hosting combined with server-side dynamic content modification using postgres was the interesting part for me. Static hosting has historically been seen as exactly that, static and immutable. Things like Cloudflare functions/workers can turn static hosting into dynamic content delivery while maintaining (most of) the benefits of static hosting. Granted, this can be done whether the underlying content is hosted…

I’m still struggling to understand how this is any different than an oldschool cms or blog with a cache in front.

Re: Cloudflare Pages: Best server tech since CGI-bin?

#59

Earlier quoted context omitted.

We just don't want to support MiTMFlare with our traffic and money.

I'm always curious how you folks would CDN without SSL termination. Or you know, host anywhere but your own gear if MiTM was a real concern.

There's a huge amount of websites that don't need a CDN (my blog has frontpaged multiple times without one). And for many (all?) of the rest you'd be fine with 3-5 regions. CDNs increase latency for low-traffic sites.
Post reply on HN