Live data from Hacker News

Cloudflare Pages: Best server tech since CGI-bin?

taras.glek.net

101–110 of 226 posts

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

#102

I tend to agree. Cloudflare services are awesome. Their documentation tends to be OK but thin. Certainly not great.

We're working on the documentation, I agree it can certainly be thin (or just not understandable). Please do file an issue for any improvements you'd like to see: https://github.com/cloudflare/cloudflare-docs/issues

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

#104
post #61

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

No it’s pointing out the server side scripting part which was new to me. do analogs exist in those other hosting options? This seems like a really nice facility - closest analog client side wise is a service worker or something that adjusts fetch.

It's funny, the simplicity really reminds me of server size scripting languages like ASP and PHP.

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

#105
post #25

Why not just make it CGI (or FastCGI) compatible so you can test it locally or run it in other environments? At least for things that are actually generating responses rather than acting as middleware. Oh, right, vendor lock-in.

The engine is open source: https://github.com/cloudflare/workerd We did not create our own engine to create "lock-in". On the contrary, it would be a huge win for us if we could simply run FastCGI or Node or whatever applications unmodified. We'd be able to onboard a lot more customers more quickly that way! Our product is our physical network (with hundreds of locations around the world), not our specific developmen…

Hey, just wanted to leave this here. It’s pure joy to work with Pages. I recently did a new homepage for my mom‘s beauty salon and decided to use CF Pages, with a few functions for booking requests and a contact form. It felt just… right. Everything fell into place as I would have liked it to. Hits the sweet spot between flexibility and pragmatism, in a way.

Enjoy your week! :)

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

#106
post #64
post #26

Earlier quoted context omitted.

Yes, it's great because static/static+some dynamic bits fits a lot of use cases and it's quite simple to deploy, manage and maintain. It's nothing that new though, Firebase (part of GCP) and Netlify have had that for years. CloudFlare just have the right combination of marketing, reputation, pricing and tech to make headlines with it again.

I have never seen an example where you land a JS file in a static website in git and it just runs as part of server side middleware. Seems legit novel but would like to know other examples.

Vercel serverless functions: https://vercel.com/docs/concepts/functions/serverless-functi...

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

#107
post #88
post #26

Earlier quoted context omitted.

Yes, it's great because static/static+some dynamic bits fits a lot of use cases and it's quite simple to deploy, manage and maintain. It's nothing that new though, Firebase (part of GCP) and Netlify have had that for years. CloudFlare just have the right combination of marketing, reputation, pricing and tech to make headlines with it again.

> Yes, it's great because static/static+some dynamic bits fits a lot of use cases and it's quite simple to deploy, manage and maintain. Do you have some examples? I always get excited by this serverless stuff, but often the use-cases are quite limited if you think about it, or maybe I’m thinking wrong, especially if you take vendor lock into consideration.

This comment is about serverless in general, not this particular tech. I’ve been abusing serverless for three years now using a NestJS bridge to the API gateway. All API request get bulk routed to a single lambda. NestJS, a dependency injection system for Node, handles particular routing, JWT validation, etc. Then my code does all the backend stuff. If I ever need to move from AWS lambda to EC2 (due to payload size or sync call limitations), I can. Neat JS will boot normally. Little to no vendor lock-in, especially in the domain later thanks to Clean Architecture.

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

#108

Earlier quoted context omitted.

You can pretty easily change from Cloudflare to any other Jamstack host. Cgi just isn't necessary anymore and would be more baggage than anything at this point. The old web stacks are just time sinks. It's so much nicer to be able to git push... And that's it. Done.

> It's so much nicer to be able to git push... And that's it. Done. Can you elaborate? My CGI-based website is deployed with `git push` as well, not sure what the difference is there.

Is it, though? Who does git pull at the server? What happens to in-flight requests during deployments? Traffic surges? Requests from Nigeria?

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

#109
post #27

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…

Having .html file extensions is very old school, and its removal is one of the popular/default redirects on all http servers that support it. Site generators also hide it through various methods (e.g. having a folder with the path name with just an index.html where a dynamic redirect isn't possible).

It was removed explicitly for SEO and having a single canonical URL for a resource _for all of time forever_. Right now we use HTML for web pages but who knows what the internet 20, 50, 100, etc. years from now will use--maybe .Super-Awesome-Mega-HTML is all the rage. If over time you are changing your site and its URLs are changing then you're breaking that canonical URL and search indexes, caches, way back machine, etc. all suffer. So the intent is don't make the format of the page (HTML) part of it's canonical URL.

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

#110

Earlier quoted context omitted.

Forgive my digression but for years I’ve seen small efforts here and there to elevate the concept of a “stack” and promote it as the level abstraction to use when discussing web apps and the like. What’s up with that? Grab any 3 commonly used pieces of technology whose names can be used to form a fun initialism, append stack to the end, and soon there will be experts speaking at conferences dedicated to it. JamStack…

Jamstack in particular is not really an example of that; it is more of a kind of architecture than a specific stack, in that it doesn't prescribe the use of specific software. An architecture where all the HTML/CSS/JS is precompiled statically for maximum cacheability, and server-side dynamic behavior happens exclusively within AJAX calls that return structured data, is a natural kind, and useful to have a term for s…

The reason why PHP was bundled with MySQL historically is not so much because it had better support for it, but rather because cheap & free hosting would generally offer MySQL (rather than, say, Postgres) - because it was easier for them. If SQLite showed up a bit earlier, I bet that would have become the standard.
Post reply on HN