BunHttpServer overview
Added in v1.0.0
Table of contents
constructors
make
Signature
export declare const make: (
options: Omit<ServeOptions, "fetch" | "error">
) => Effect.Effect<Server.HttpServer, never, Scope.Scope>
Added in v1.0.0
layers
layer
Signature
export declare const layer: (
options: Omit<ServeOptions, "fetch" | "error">
) => Layer.Layer<Server.HttpServer | Platform.HttpPlatform | Etag.Generator | BunContext.BunContext>
Added in v1.0.0
layerConfig
Signature
export declare const layerConfig: (
options: Config.Config.Wrap<Omit<ServeOptions, "fetch" | "error">>
) => Layer.Layer<
Server.HttpServer | Platform.HttpPlatform | Etag.Generator | BunContext.BunContext,
ConfigError.ConfigError
>
Added in v1.0.0
layerContext
A Layer providing the HttpPlatform
, FileSystem
, Etag.Generator
, and Path
services.
The FileSystem
service is a no-op implementation, so this layer is only useful for platforms that have no file system.
Signature
export declare const layerContext: Layer.Layer<any>
Added in v1.0.0
layerServer
Signature
export declare const layerServer: (options: Omit<ServeOptions, "fetch" | "error">) => Layer.Layer<Server.HttpServer>
Added in v1.0.0
layerTest
Layer starting a server on a random port and producing an HttpClient
with prepended url of the running http server.
Signature
export declare const layerTest: Layer.Layer<any, HttpServerError.ServeError>
Added in v1.0.0