effect-http-node is a crucial adapter package within the `effect-ts` ecosystem, providing the Node.js-specific implementation for serving declarative HTTP APIs built with `effect-http`. It leverages the `@effect/platform-node` package to bridge `effect-http`'s server abstractions with Node.js's native HTTP server capabilities, enabling developers to run highly type-safe, functional, and concurrently managed web services. The current stable version is 0.27.0. This package, along with `effect-http` and core `effect` libraries, follows a rapid release cadence, often undergoing minor version bumps to align with updates in its peer dependencies, reflecting the active development of the `effect-ts` project. Its key differentiator lies in enabling the `effect-ts` programming model—emphasizing structured concurrency, resource management, and robust error handling—directly within Node.js for HTTP services, providing a strong alternative to traditional imperative frameworks. It does not introduce new HTTP API paradigms but rather provides the runtime environment for `effect-http`'s existing ones.
Verified import paths — ran on the pinned version, not inferred.
Used for creating a Node.js HTTP server instance from an `effect-http` application. The Effect ecosystem is primarily ESM-first.
While `NodeRuntime` is from `@effect/platform-node`, it is essential for running `Effect` programs, including the server, in a Node.js environment. It's often imported as a namespace.
Although `Api` is from `effect-http`, it's fundamental for defining the API contract that `effect-http-node` then serves.
This quickstart demonstrates defining a simple `effect-http` API, implementing its handlers, and serving it using `effect-http-node` within a Node.js runtime. It includes a GET and a POST endpoint.
Breaking-change detection hasn't run for this library yet.
CVE tracking and dependency tree are planned for a later release.