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

Support more WinterCG-like runtimes (export actual fetch-like API) #249

Open
verydanny opened this issue Jun 6, 2024 · 1 comment
Open

Comments

@verydanny
Copy link

verydanny commented Jun 6, 2024

I really love the functions, but they're quite limited. I understand a lot is for the sake of performance, but flexibility would be nice too.

For example, I'd love to create a static site adapter for Astro to use with open-runtime functions.

The issue is it's still a bit limited because the open-runtime export default async ({ req, res, log, error }) isn't "web standard". The req, res.send, res.json are not really standard. They're super stubbed-down versions.

Or what if I wanted to implement easy routing using a micro-backend framework like Elysia or Hono?

Scenario:

  • I want to create a code documentation website
  • I generate the static site with Astro
  • I use openruntime-adapter (WInterCG-compatible)
  • Serve static site files on a function-based runtime
  • Allow custom routes that even accept buffer, etc.

I don't think this is possible without a lot of tinkering with the current API.

@verydanny
Copy link
Author

verydanny commented Jun 9, 2024

In addition, the limit for formData should be customizable. I'd love for my users to upload things through functions. Right now anything over 1mb causes issues.

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

1 participant