Skip to main content Link Search Menu Expand Document (external link)

BunHttpServer.ts overview

Since v1.0.0


Exports Grouped by Category


constructors

make

Signature

declare const make: (
  options: Omit<ServeOptions, "fetch" | "error">
) => Effect.Effect<Server.HttpServer, never, Scope.Scope>

Source

Since v1.0.0

layers

layer

Signature

declare const layer: (
  options: Omit<ServeOptions, "fetch" | "error">
) => Layer.Layer<Server.HttpServer | Platform.HttpPlatform | Etag.Generator | BunContext.BunContext>

Source

Since v1.0.0

layerConfig

Signature

declare const layerConfig: (
  options: Config.Config.Wrap<Omit<ServeOptions, "fetch" | "error">>
) => Layer.Layer<
  Server.HttpServer | Platform.HttpPlatform | Etag.Generator | BunContext.BunContext,
  ConfigError.ConfigError
>

Source

Since 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

declare const layerContext: Layer.Layer<any>

Source

Since v1.0.0

layerServer

Signature

declare const layerServer: (options: Omit<ServeOptions, "fetch" | "error">) => Layer.Layer<Server.HttpServer>

Source

Since 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

declare const layerTest: Layer.Layer<any, HttpServerError.ServeError>

Source

Since v1.0.0