Hacker News new | ask | show | jobs
by csomar 242 days ago
I didn't find it hard to migrate. Pages are workers, so might as well just use a worker.
2 comments

It's hard if you don't use a JavaScript based SSG, well I didn't find how to do it with Hugo so I'll stay in cloudfare pages
Generate the files locally and then push them to the worker? Even with a JS based SSG that's the only way to do it and the difference between worker and pages. (workers have no build step)
Just to note because I was confused by this:

I was under the impression that workers are just lambda functions, and therefore would fall under different billing rules than pages which serve static files (with unlimited bandwidth).

But workers apparently have a 'Static Assets' feature that just serves static assets (like pages) and comes with free unlimited requests, unlike worker function invocations, so as you say it seems to be essentially the same as pages.

https://developers.cloudflare.com/workers/static-assets/

What I meant the same as worker, is that under the hood, pages are just workers. The Static Assets feature was probably added because the by-request billing wouldn't make any sense for static assets.