Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy to Cloudflare Workers #14901

Open
1 task done
DIYgod opened this issue Mar 22, 2024 · 7 comments
Open
1 task done

Deploy to Cloudflare Workers #14901

DIYgod opened this issue Mar 22, 2024 · 7 comments

Comments

@DIYgod
Copy link
Owner

DIYgod commented Mar 22, 2024

What feature is it?

Our basic framework supports deployment to Cloudflare Workers: https://hono.dev/getting-started/cloudflare-workers

However, the got used by RSSHub has incompatible dependencies, so we need to remove the got dependency before supporting deployment.

I have created a new branch here: https://github.com/DIYgod/RSSHub/tree/feature/cloudflare-workers

What problem does this feature solve?

More flexible deployment methods

Additional description

No response

This is not a duplicated feature request or new RSS proposal

@TonyRL
Copy link
Collaborator

TonyRL commented May 6, 2024

Considering all the dependencies bundled, I think that the size of the output will be well exceed the paid limit.

https://developers.cloudflare.com/workers/platform/limits/

Feature Workers Free Workers Paid
Worker size 1 MB 10 MB

@ImSingee
Copy link
Contributor

Is there any updates on it? I guess with nodejs_compat_v2, it's possible to make rsshub works more easily.

And some routes require puppeteer, maybe we can use Durable Object + Browser Rendering

@jokester
Copy link

jokester commented Oct 16, 2024

nodejs_compat_v2 is based on unenv. Routes based on fetch have a chance to work like in node.js .

@TonyRL TonyRL mentioned this issue Oct 30, 2024
1 task
@chesha1
Copy link
Contributor

chesha1 commented Oct 30, 2024

Cloudflare natively supports fetch in their JavaScript runtime. I am wondering if we could leverage this to save space instead of got, given the 10 MB size limit for Cloudflare workers and 25 MB for Cloudflare pages.

@asukaminato0721
Copy link
Contributor

asukaminato0721 commented Nov 22, 2024

Cloudflare natively supports fetch in their JavaScript runtime. I am wondering if we could leverage this to save space instead of got, given the 10 MB size limit for Cloudflare workers and 25 MB for Cloudflare pages.

no, got is devDep, but https://github.com/sindresorhus/ky may be usable.

@chesha1
Copy link
Contributor

chesha1 commented Nov 22, 2024

@asukaminato0721 I checked the package.json again, and that's indeed the case. By the way, your avatar is cute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants