-
-
Notifications
You must be signed in to change notification settings - Fork 578
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 for Firebase Functions #1358
Labels
enhancement
New feature or request.
Comments
It was not so hard in the end. Import node-server package and use import { getRequestListener } from '@hono/node-server'
import { onRequest } from 'firebase-functions/v2/https'
import { Hono } from 'hono'
const app = new Hono()
app.get('/**', (c) => c.text('Hello Node.js!'))
export const web = onRequest(getRequestListener(app.fetch)) |
Great! |
There is an silent error 500 when doing a POST request with payload. TypeError: Response body object should not be disturbed or locked
at extractBody (node:internal/deps/undici/undici:6433:17)
at new Request (node:internal/deps/undici/undici:7314:48)
at /<path>/functions/node_modules/@hono/node-server/dist/listener.js:48:33
at /<path>/functions/lib/functions/src/index.js:79:64
at /<path>/functions/node_modules/firebase-functions/lib/v2/providers/https.js:57:29
at cors (/<path>/functions/node_modules/cors/lib/index.js:188:7)
at /<path>/functions/node_modules/cors/lib/index.js:224:17
at originCallback (/<path>/functions/node_modules/cors/lib/index.js:214:15)
at /<path>/functions/node_modules/cors/lib/index.js:219:13
at optionsCallback (/<path>/functions/node_modules/cors/lib/index.js:199:9) It is exactly the same error as in honojs/node-server#84 |
Could you create the issue on |
Yes, lets move conversation to #1695 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What is the feature you are proposing?
I think Deno is a perfect to be used as a dynamic router in Firebase functions. Currently Express is the main choise.
Firebase function expect
(request, reponse)=>void
function which should not be so difficult to provide from Deno. I have looked into nodejs-server implementaion but I might need some more hints.The text was updated successfully, but these errors were encountered: