Hacker News new | past | comments | ask | show | jobs | submit login
Cloudflare Pages goes full stack (cloudflare.com)
350 points by samwillis 71 days ago | hide | past | favorite | 123 comments

Hey there - I'm the PM for Pages! Super excited about this release today. We also announced our support for GitLab and partnerships with several CMSes! Happy to answer any questions.

It's really exciting to see Cloudflare Pages keep progressing!

Any plan to eventually offer drop-in support for Next.js? (Not just static builds, but the backend server/serverless functions too, like Vercel... maybe mapping certain APIs to Workers?). It would be lovely to be able to leverage the power of that framework on Cloudflare infrastructure.

Edit: Next and frameworks like it solve the "I love the idea of serverless, but don't want to reinvent the whole backend from scratch" problem. It's nice to have a framework abstract away problems like routing, caching, invalidations, buildchains, image transformations, etc. Cloudflare Pages and Workers can do almost all the same things, but requires more coding and configuration... that's the only reason we went with Next + Vercel instead of Pages.

there is https://github.com/flareact/flareact in development by a shopify engineer, worth checking out... seems like a good architecture for deeper integration with workers runtime

Saw this a few months ago and briefly considered it, but it seemed too risky to use on a production website.

Next.js is maintained by an entire company (Vercel). If Flareact ever gains official Cloudflare support, that'd be wonderful!

This is the first thing I thought of as I was reading the server side section

Agree. Also, FWIW, what Cloudflare built is definitely a nice option. I would prefer even closer integration though and will be test driving this.

But… This is almost just like an index.html and api.php file on a server. I think what devs really need/want is the Svelte Kit adaptor but an official Cloudflare way.

Edit: Apparently the functions support parameterized files like .functions/friends/[name].js [1] which creates a lot closer integration. Put that feature front and center! I think this really solves many issues.

[1] https://blog.cloudflare.com/building-full-stack-with-pages/

Thanks for bringing this up! It's definitely something that is on our radar. We're looking into improving the experience with frameworks, and Next is one of them!

Is there a way to push content directly to Pages instead of having it pull from Github or Gitlab? Many teams have their own deployment tooling with pre-existing git integrations, and would rather add a Pages target to that. For example Netlify lets you bypass their github pull feature. Does Cloudflare?

Yep this one is important to me too.

I really dislike the GitHub integration approach, but I get that it makes it simpler for some use cases.

I'm interested in non-git deployment as well. For an image-heavy site, I would really prefer to avoid having to store static assets in GitHub so that I don't have to deal with git LFS. It would be nice if their CLI tool could support directly deploying a Pages application.

Right now, you can only create a project through GitHub/GitLab. However, being able to upload your pre-built assets directly to Pages is something we are working on now! Listen out for updates!

Thanks. This makes Pages a non-starter for me. I look forward to trying it with direct upload!


- Are Pages functions running Workers Unbound or Workers Bundled?

- Do functions support Worker composition announced yesterday [0]?

[0] https://blog.cloudflare.com/introducing-worker-services/

GitLab team-member here. So exciting to see GitLab support! I'll finally be giving Pages a try later today. :)

The link to the 'example to see the SvelteKit adapter' in the article is broken (https://github.com/lukeed/pages-fullstack)

So is the link to the usage limits.

working on this now - should be fixed soon

clear cache and cookies - docs are up :)

I hope this doesn't come across too aggressively, but if merely clicking "refresh" doesn't do the trick (as suggested through a recommendation to clear cache/cookies) please investigate some cache-busting techniques!

The @sveltejs/adapter-cloudflare package isn't published to NPM yet.

Hi! Do you know if this release changes the ability to enable wildcard subdomain routing to Pages without requiring a >$200/mo Enterprise plan? Its a feature Netlify offer in their $19 "Pro" plan and is a roadblock for us to fully leverage Pages.

Does Pages now support multiple deployments from a single git repository? When I looked a while back it seemed like there was no way to host multiple domains on CF Pages from a monorepo. GH Pages has the same limitation, but Netlify does support monorepos.

support for monorepos are on deck and coming soon!

Very exciting!

What is your story with Pages and Rust Workers? Will they get the benefits of automatic deployment or is it still required to use Wrangler and manually wire things together?

Where is information on gitlab support? I didn't see it linked in the post. Is this just the main gitlab service, or are any third party gitlab servers possible?

I'm building a svelte-kit based blogging framework called Svekyll with a hosting service called ExtraStatic. It all uses gitlab on the backend and I'm very curious if you could author on ExtraStatic and then publish into cloudflare. Right now I use the static adapter but I'm interested in seeing if the cloudflare adapter just works.

ExtraStatic is interesting because it allows you to publish without really knowing git. You can publish using just email, or you can use the creator tool or the Android app to publish into gitlab and then it builds automatically. Hosting on cloudflare would be awesome.

Very exciting stuff!

GitLab blog post: https://blog.cloudflare.com/cloudflare-pages-partners-with-g...

Sounds like what you're describing would be possible!

Thanks for the link!

Unfortunately, it looks like this only works with gitlab.com. I don't think my GitLab instance will work as this blog post describes. It's still an incredibly cool offering and I am sure there is a way to do it with just vanilla CI inside my GitLab instance.

Great announcements today. Hoping you can share any expected progress on the long build times (chiefly initializing the build environment itself), which right now constitute the only real down-side of CFP IMHO.

Totally understand the frustration! Improving build times is at the front of our minds and the work is well underway - stay tuned for updates!

It's not full stack until there is a real database offer ;)

KV workers are pretty close FWIW

If I just wanted to deploy a blog from github to Cloudflare pages, what would be the best way of doing that without writing javascript? Is there a way currently?

Absolutely possible! If you've just got a folder of static assets, you can connect it up to Pages, and enter that directory as the "build output directory".


Thank you. Docs are good, I'm already up and running :)

For that you can use Github pages and you don't need to touch JS or Cloudflare

Tried that, what I really like about Cloudflare is that it offers me more freedom than Github which basically forces you to use Jekyll if I'm not mistaken.

You are mistaken, you can deploy any static site.

I’ve deployed a couple of static documentation sites with automated builds with the help of GitHub Actions [0].

[0]: https://github.com/marketplace/actions/github-pages-action

What do you mean by more freedom? You definitelly don't need Jekyll for Github pages. Any static page can be hosted on Github pages

Just last week I moved two of my personal projects from GitLab to GitHub just so I could use Pages for them.

If only I'd waited one more week...

Awesome! Do you know if/when there will be support for self-hosted Gitlab instances?

is this team hiring at all?

Pretty cool to see them support Svelte(Kit) as the (or one of?) the first frameworks with direct support! Recently deployed a new application on Vercel, but very much looking forward to when Cloudflare will be an equally, or even more appealing choice! Amazing work, fantastic direction, keep it up!

Maybe Cloudflare should have hired Rich Harris, instead of Vercel.

Hint hint, nudge nudge to both Cloudflare and Rich Harris :)

Sounds like Vercel is going to get good Svelte support, too, now that they hired Rich Harris.

My thought exactly!

Well on its way to being a huge contender in this space now. As I was saying on another post, I'm really just eager to see them roll out an in-house, more conventional datastore option that plugs in with this.

If I can create a full-stack preview environment comprised of all these services, that will be huge. It's edge (no pun intended) is that it's globally available by default.

We are only half way through their "Full Stack Week", so I'm hoping they have something coming on that...

Monday was Workers talking to external services + durable objects.

Tuesday was upgrades to workers and the toolkit to make it easer to develop full apps on them.

Wednesday (today) was Worker+Pages integration and front end development.

No announcements yet of any upgrades to the Worker Key Value store, wouldn't be surprised if they have a day of datastore type announcements - its the part of the "full stack" they haven't covered this week yet.

They have to climax on Friday with something big right?

Wow. I didn’t know it was a full week of announcements. I was thrilled with the static typing thing yesterday and this today, so I’m pretty excited to see the next 2 days now.

Price reductions and increase in script sizes (at 1MB, currently) would be nice, too.

Plus, at the end of the week, announcements related to Web3 services during a broadcast on Cloudfare TV. Their CEO will be talking to a prominent crypto investor.

My guts tell me they will add at least tcp support in workers.

They've already announced this week that they're working on it! https://blog.cloudflare.com/introducing-socket-workers/

Thanks for sharing, I missed this one!

I was worried for a bit, but they put a significant amount of time into explaining how they want to work with others to develop some kind of standard.

Hopefully the client API is also something that can make its way back into the browser at some point.

Would love to see support in your Terraform provider for CF pages - has been an open issue on your Terraform provider since April: https://github.com/cloudflare/terraform-provider-cloudflare/...

For context, our organisation has moved completely to Terraform for all our Cloud components, and not having Terraform support for Cloudflare Pages makes it a no-go. Even our Data Warehouse team has moved completely to Terraform, so something as 'webby' as static site hosting should be a simple use case.

You can contribute such a terraform provider from your end.

Maintain it and deal with other people's use-cases and bugs, when a $67B company won't put the effort in to helping you use their product?

I know there's a maker culture here but there's a limit sometimes.

You don’t need to open source it.

It is amazing to me that Heroku is sitting there letting everyone pass them by. Heroku is still a great platform for a scalable 0 effort full stack application. Yet as soon as you need a CDN hosted static site, you look outside the platform. Which is nuts, because they are such natural progressions (both ways) of each other.

These are wonderful companies -- one trick ponies. They come up with one great product and it almost sells itself. That is, until they cannot come up with new supporting products to increase growth. At this point, the companies install an outside CEO, or they get acquired by a large company while everyone smart cashes out and leaves. The smaller and more agile companies like Cloudflare completely take their market share with a product that will eventually be better. They are like little does that get eaten by the wolves.

Another example is pagerduty. A company that has been around for well over a decade with no product innovation. They installed an outside CEO, a sales/marketing person who really doesn't have the technical know-how to come up with new innovations. As of today, Datadog has entered their market with a direct competitor product. The CEO of Datadog, conversely, lived and breathed dev-ops in his entire work career. He is the wolf that will be eating the lunch of the non-technical does.

Does Datadog really directly compete with PagerDuty? They integrate with one another, and my company uses both, though honestly if Datadog made the kind of alarm-level notifications functionality as PagerDuty I probably wouldn't need PagerDuty anymore. That said, the simplicity of a single-purpose product definitely also has its appeal.

They have started to get directly into pagerduty's space with their incident management features: https://www.datadoghq.com/blog/incident-response-with-datado...

> The smaller and more agile companies like Cloudflare

Cloudflare is smaller than Heroku?

Cloudflare is smaller than Salesforce, which owns Heroku. When a company gets absorbed by a large company, there are usually paralyzing effects.

Agreed. Salesforce has really let it languish. You're even seeing superior offerings with direct competitors like Render.

There is no one who is eg the GM of Heroku. Salesforce has no idea what they have and are basically tying to figure out how to get existing SF customers to use it. I think they want Heroku customers to start using SF more but have no clue how. The result is that Heroku feels abandoned and on life support.

Its too bad because Heroku is a great product that has a ton more potential.

Look, we're building codesphere.com for exactly that :)

Just in time.

Looks great! exactly what I need

Love That!!

It's interesting how the news cycle goes. Today on the HN homepage:

Netlify Raises $105M (netlify.com)

Netlify Acquires OneGraph (netlify.com)

Cloudflare Pages Goes Full Stack (cloudflare.com)

It will be interesting to see how this all plays out..

I for one will be migrating my static sites away from Netlify. I were just waiting for the Gitlab support.

For what reasons?

That is an interesting observation. I'd think Cloudflare has the upperhand because of their CDN and soon built-in object storage with "no" egress fees... going to be hard to compete against that.

Also Rich Harris (Svelte creator) joined Vercel this week: https://twitter.com/Rich_Harris/status/1458822051263823875

As an indie software maker it frustrates me when I have to pay 50$ dollars to have a decent cloud server setup to run my apps. Yes there are 5$ shared vm-s, but I want a decent enough ram and cores to lift my load. And a 4gb ram and 4 cores shouldn't cost me 50$ either.

I knew when WASM was introduced, this will bring out a new dimension of computing power available at affordable cost. But I wasn't sure how. But now I know. Cloudflare is doing some incredible work here, launching cloudflare workers and then capitalizing it to bring low cost computing to other edges. If lucky, we might enter an era where cloud infrastructure doesn't gets polarized into hands of tech giants like amazon, microsoft and stays affordable as it once was.

There are many many providers that offer deals that are more than within the stated budget.

Hetzner Cloud will give you around 16-32GB and more than 4 cores for <50$. For similar amount of money you can also get a dedicated server from them (and many other providers) with > 60GB of RAM, > 4 cores and nvme. Scaleway, OVH and others also have offerings that are not too far off (but less familiar with their offerings).

When trying these cloud providers I always come back to AWS, the AWS network is so good.

It better be good since it's so expensive. NAT Gateways run on money.

Oracle Cloud free tier. 4 cores ARM64, 24GB of RAM, 200GB disk.

Fwiw, consensus, in some circles, is that's a very limited offering and they like to entirely delete accounts after the trial if you don't respond to their sales/onboarding emails.

They may even continue to email you reminders about your trial expiring and tell you that you can still use all the free tier offerings, even though you can't log in anymore because the account is gone.

It will take about 20 years of flawless, pro-customer execution before I trust Oracle with anything at all.

What does any of this have to do with WASM? WASM is still a second-class citizen on Cloudflare Workers and Javascript is still the only really practical choice.

"By using your repo’s filesystem convention and exporting one or more function handlers, Pages can leverage Workers to deploy serverless functions on your behalf. To begin, simply add a ./functions directory in the root of your project"

just my .02 but that first sentence is way more confusing than it needs to be.

I'm pretty sure it just means that file paths are mapped to URL routes and the functions exported within become handlers for the given HTTP methods. This would be as opposed to implementing the routing logic as code.

But I haven't used it, so I don't know.

Honestly, I don't see the point in "serverless" as they call it (which is actually servers / centralized clouds), except maybe to have a common compilation target for stuff, to limit the surface area of APIs.

Literally you can just control a lot more about your stack and do what you want (mysql, outside APIs, etc.) and use your servers as origin servers for the CDN. You can take your regular PHP site, separate out the "session-dependent" stuff into a separate service, and the rest is static resources that can be cached.

Or even better: do ACTUAL serverless:



I gave a talk recently about it, that you might be interested in: https://www.youtube.com/watch?v=yKPKuH6YCTc

The Cloudflare stuff is the first "serverless" platform I've considered using. I develop independently and the value proposition is too good to ignore. They scale to $0 on idle deployments, I don't have to maintain any infrastructure, I don't need CI systems for building and deployment, I get preview URLs, I can layer in Cloudflare Access, etc..

I'm going to drink the Kool-aid and see how it tastes :-)

price & convenience. It's really that simple.

Supporting SvelteKit out of the box is huge for Svelte. I wonder if it's on the edge of an adoption surge.

This is anecdotal, but migrating my biggest personal project from Vue+Webpack to Svelte+Rollup was one of the easiest and best changes I've made so far.

Recently adding esbuild to the mix made things much faster, too.

As someone who uses and enjoys Vue for my personal project, could you elaborate on why going to Svelte was a 'best' change?

Vue was working pretty well for me until I decided to rewrite the whole project in Typescript. I hit a problem with Webpack that devoured all of my memory during a build, and despite spending days on it, I couldn't figure out why it was happening. The Vue CLI was also having similar problems, if I remember right, so I tried to replace the Vue CLI with home grown scripts. That didn't work either.

So, I looked at other options, and discovered Svelte. I originally converted from Vue to Svelte out of necessity, but I've grown to adore how it's structured and how "Javascripty" it feels.

yea id love to hear more too

Awesome. I want to use Cloudflare more, especially the email service they announced. How much longer do I have to wait for these things to become GA?

Pages itself has been GA for a little while now (https://blog.cloudflare.com/cloudflare-pages-ga/). For the integrations with Workers, it's TBD (we generally want to leave things in beta for a bit and let it bake in before giving you the thumbs up to put your production site on it), but we move fast, so likely sometime in the first half of next year.

This is really exciting stuff, they're so close to a one stop shop for DevOps, monitoring, serverless backend, file storage, data store and frontend asset serving.

I feel it's now within reach to migrate one of my side projects, except Redis and Postgres which I'll have to keep on AWS for now.

It seems they're building a fully integrated developer experience that abstracts so much complexity away from deployment, security and otherwise.

I have to imagine database and other solutions like pub/sub will be coming at some point in the future, too.

(disclosure: long $NET)

postgres can be hosted via supabase. Redis also has cloud service I think

upstash, very cf-worker oriented https://www.upstash.com/

cockroachdb serverless

If they handle nextjs integration, would be very interesting.

How does everyone feel about Wrangler CLI versus git-triggered deploys through GitHub?

I think Vercel and Render are both doing an incredible job with their deploy processes, and a lot is owed to them not requiring use of a CLI. I wonder if I'm in the minority here?

Personally, I prefer a separate deploy command if you want it - it allows you to more easily use external CI systems. There are several app platforms I've written off because they only worked via git.

We are using GitHub Actions with wrangler and it works fine. Git push and the site is deployed to worker kv site.

It didn't do the one commit one subdomain though but maybe they are adding it with this announcement.

Cloudflare pages is amazing and IMO the right direction. For a small project its so easy for me to create an html file and zap it right into a custom domain in a few minutes, with so much flexibility.

I hope the free tier stays as good as it is now! Thanks folks :)

I hope it gets even better. :-)

I gave up on Cloudflare Workers after spending a full work day debugging CORS errors that the worker was throwing due to a logic error that was completely unrelated to CORS.

You can only spend so many hours in your life tweaking and re-testing CORS headers for no reason.

Maybe Pages is better. I just don't want to touch Workers on the backend of Pages anymore.

Sorry to hear about your experience with Workers. Be sure to get in touch if you have more questions about it. If you'd like to try out Pages, we recently announced support for setting custom headers with an `_headers` file. Check out the announcement here(https://blog.cloudflare.com/custom-headers-for-pages/). Docs are also linked in the blog!

Curious to know if anyone is running real production workloads with Cloudflare pages + workers. I'm asking because every time I've tried serverless offerings I've always been disappointed with the performance and debugging experience.

> I've always been disappointed with the performance and debugging experience

I think a comment like this deserves some details!

Very often I'll have some function that works fine locally but breaks when deployed to the serverless environment and figuring out why it's broken takes a lot more time than expected. Often it's because I was using some feature that for some reason or another is not supported in the serverless sandbox but other times it's memory or CPU limitations that are completely opaque and impossible to debug. For example, is it possible to use libraries written in C. Node.js has a bunch of libraries like that and it's never clear if those are supported in any given serverless environment.

Most of these platforms also don't have actual hard limits so it's possible to use up whatever budget is allotted to a project and then get throttled randomly without any indication of what exactly happened or why exactly the limits where reached. Maybe things have improved since last time I tried these platforms but I'm doubtful. It's very hard to design easily debuggable systems when there are so many layers of abstraction involved and there is no way to actually set breakpoints and see what is going on in the live process.

Well for workers these questions can be answered more straightforward than for lambda:

Will a node/C thing work?

No. Only third party packages that are cleanly isomorphic will work. The most exciting thing you get is fetch. You can compile things to WebAssembly I guess.

is performance good?

For HTTP response times it‘s top notch. For compute, if it matters then it‘s not a good use case imho.

If you‘ve had performance issues with workers (not compute bound) I would like to hear about them, because I have put it into a "way to go when I want every answer to be reliably fast" bucket.


Well… it‘s a matter taste if what they provide is enough. Better than lambda but worse then a local server.

Cloudflare is going crazy wow

Does this require putting your website behind Cloudflare captchas, cause if so I don't foresee being able to use this. There is no reason to captcha a static website IMO.

You can always configure Cloudflare firewall settings to lower your website’s security level [1] and avoid using CAPTCHAs.

[1]: https://support.cloudflare.com/hc/en-us/articles/200170056-U...

It does not.

Hmm, maybe it's finally time for me to move off of Heroku

I predict that Cloudflare will try to acquire Netlify in the near future. This product is getting pretty close if not entirely in direct competition with them.

Cannot see that happening. Netlify is too big and has raised a lot of money, its already hard enough to deal with organizational debt once you become a public company. They acquired Linc, it was a pretty small startup and Glen Maddern their CTO is the engineer in this blog post. He also happens to be one of the smarter folks I've met. I really like the folks at Netlify and Vercel very much, all good people, but it I think it makes more sense that CF just takes the valuation of those two startups and tries to add it to their market cap organically.

Can't see it happening…

Cloudflare already have a better technology stack, that delivers a better visitor experience

Netlify is Apache Traffic Server with bits wrapped around it, there's no CDN to speak of, limited feature set etc.

My first experience with Pages for a static site was really positive. I'm going to have to think of a full stack app idea just so I can try this out.

Interesting time (with the Netlify news as well). But for me, this is really exciting. Curious to see what reInvent brings soon as well.

so whats the deal with the unlimited bandwidth? anyone pushing more than 10-100TB with input?

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact