Skip to content

Instantly share code, notes, and snippets.

View Adammatthiesen's full-sized avatar
🚀
Building a CMS

Adam Matthiesen Adammatthiesen

🚀
Building a CMS
View GitHub Profile
@Adammatthiesen
Adammatthiesen / Effectify-http.ts
Last active February 10, 2026 04:59
webHandler to Effect Http Handler
import { HttpServerRequest } from "@effect/platform";
import * as HttpServerResponse from "@effect/platform/HttpServerResponse";
import { Readable } from "node:stream";
import type { ReadableStream as WebReadableStream } from "node:stream/web";
import { Effect } from "effect";
/**
* Converts an HttpServerRequest to a standard Web Request.
*/
export const ServerRequestToRequest = Effect.fn(function* (