Low-level function that turns a telefunction HTTP request into an HTTP response. It's a pure function: stateless and side-effect-free. It runs in any runtime, with no adapter required.
Most apps should use new Telefunc() instead — it's the standard server integration.
new Telefunc() has full-fledged support for Telefunc Stream, whereas serve() doesn't support the following:
// Environment: serverimport { serve } from 'telefunc'const httpResponse = await serve({ // `request` being a `Request` instance request})// Build an HTTP response using the following:httpResponse.getReadableWebStream() // or httpResponse.getBody()httpResponse.statusCodehttpResponse.headers