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

CloudFlare Worker Support #572

Open
milan-miljus-codetribe opened this issue Jul 25, 2024 · 3 comments
Open

CloudFlare Worker Support #572

milan-miljus-codetribe opened this issue Jul 25, 2024 · 3 comments

Comments

@milan-miljus-codetribe
Copy link

Hello everyone, I've tried deploying the lib to CloudFlare Workers environment and I've encountered some issues because this environment doesn't have full support of NodeJS APIs that the Rettiwt-API relies one.

Some of this Node APIs are: http, https, querystring, fs, net, tls, assert

Are there plans to support JavaScript runtimes other than node?

@Rishikant181
Copy link
Owner

I've tested the library on Bun, where everything works. So you might give it a shot.

@milan-miljus-codetribe
Copy link
Author

Glad that it works on Bun, and nice work on the lib btw, I really like it!

But unfortunately this doesn't solve my problem -- CloudFlare Worker is JavaScript runtime itself, and I can't deploy my own runtime, neither nodejs nor Bun, and I have no choice in the architecture here...

Here's the list of nodejs apis supported by CF Workers, as you can see the ones I've mentioned are not officially supported.

There is a trend in the world of npm packages of supporting different runtimes, including CF Workers (some of those are hono, drizzleOrm...) so I was hoping that there may be similar initiative here, but I understand if this is not on the priority list at all.

Would you be interested if somebody submitted a PR which avoids the use of these APIs (at least for certain environments)? This might bring more value in the lib as it increases its usability over different/growing JS runtimes?

@Rishikant181
Copy link
Owner

In that case, I'll have to add support for Cloudflare Worker runtime. I'll keep the issue open till it has been added.

Thanks for the feedback!

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

No branches or pull requests

2 participants