NodeHttpPlatform
Node.js implementation of the Effect HTTP platform service.
This module connects the portable HttpPlatform file response helpers to
Node runtime primitives. It serves local files through Node readable streams,
supports byte ranges, converts Web File values to readable streams, and
fills in content type and content length headers when needed.
Constructors
Creates the Node HttpPlatform, serving file responses from Node readable
streams and adding MIME type and content-length headers when needed.
Signature
declare const make: Effect<{ readonly compression: Compression; readonly fileResponse: (path: string, options?: WithContent & { readonly bytesToRead?: SizeInput; readonly chunkSize?: SizeInput; readonly offset?: SizeInput; }) => Effect<HttpServerResponse, PlatformError>; readonly fileWebResponse: (file: FileLike, options?: WithContent & { readonly bytesToRead?: SizeInput; readonly chunkSize?: SizeInput; readonly offset?: SizeInput; }) => Effect<HttpServerResponse>; readonly platform: "deno" | "node" | "bun" | "web";}, never, Generator | FileSystem>