WinterCG fetchHandler #4821
xantiagoma
started this conversation in
Feature Requests & Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Guys,
I think it would be great if payload has a WinterCG compatible fetchHandler method
payload.fetch(request: Resquet): Response
similar toThis is possible related to:
Now with the moving to Next maybe this is easier (?)
e.g. using Bun is possible to run payload but it needs a express instance to be mounted on init.
for example I could run the following code that mounts payload and Elysia without having to create a express instance.
Also I think It would be great for testing similar to what is shown on ElysiaJS Testing
or to be used in RSC (other API handlers) internally without having to do an outbound request (as alternative to Local API)
or in Astro / Next App Router / SvelteKit / Nuxt / SolidStart / CF Workers or any other WinterCG server.
Backwards compatibility with express I think is possible with
import { createMiddleware } from '@hattip/adapter-node';
,import {getRequestListener} from '@hono/node-server';
or similar.Beta Was this translation helpful? Give feedback.
All reactions