7 ms·
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 mo
by gkoberger 4y ago
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 https://twitter.com/vercel/status/1579561293069316096
- elondaits 4y agoI’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 the static hosting companies.
- jokethrowaway 4y agoVercel 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.
- leerob 4y agoAll of the Vercel platform features you can use in Next.js (or other frameworks) are also available through the Build Output API for frameworks to target. This is what frameworks like SvelteKit, Nuxt, Solid, etc use on Vercel. https://vercel.com/blog/build-output-api https://vercel.com/blog/build-output-api
- emptysongglass 4y agoIf 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.
- cj 4y agoStatic 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 on Cloudflare, AWS, or a server in your garage so long as it’s proxied/CDN’d by a service like Cloudflare or Cloudfront+Lambda@edge, etc.
- sofixa 4y agoYes, 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.
- gfodor 4y agoI 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.
- neongreen 4y agoVercel serverless functions: https://vercel.com/docs/concepts/functions/serverless-functions https://vercel.com/docs/concepts/functions/serverless-functi...
- gfodor 4y agoThat's not middleware, is it? It's cool, but sits between what is discussed here and something like a FaaS. My understanding is that this post is about actually deploying middleware that runs during the serve of the static pages.
- gfodor 4y agoNo 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.
- darkerside 4y agoIt's funny, the simplicity really reminds me of server size scripting languages like ASP and PHP.
- ethbr0 4y agoIt's amazing how far I got down in the comments before there was a "This is like X", where X=PHP. PHP, getting shit done since '95.
- darkerside 4y agoPut it on a tshirt
- edaemon 4y agoYes, many of the other services can do server-side rendering (SSR), deferred static generation (DSG), and/or incremental static rendering (ISR).
- deleted 4y ago[deleted]
- tarasglek 4y agoAuthor here. I actually thought about using this library. In my case re-rending as svg was too complex. Much more practical to upload screenshots of DOM, share those via functions/middleware.
- deleted 4y ago[deleted]