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

Platform overview

Added in v1.0.0


Table of contents


constructors

make

Signature

export declare const make: (impl: {
  readonly fileResponse: (
    path: string,
    status: number,
    statusText: string | undefined,
    headers: Headers.Headers,
    start: number,
    end: number | undefined,
    contentLength: number
  ) => ServerResponse.ServerResponse
  readonly fileWebResponse: (
    file: Body.Body.FileLike,
    status: number,
    statusText: string | undefined,
    headers: Headers.Headers,
    options?: FileSystem.StreamOptions | undefined
  ) => ServerResponse.ServerResponse
}) => Effect.Effect<Platform, never, FileSystem.FileSystem | Etag.Generator>

Added in v1.0.0

models

Platform (interface)

Signature

export interface Platform {
  readonly [TypeId]: TypeId
  readonly fileResponse: (
    path: string,
    options?: ServerResponse.Options.WithContent & FileSystem.StreamOptions
  ) => Effect.Effect<ServerResponse.ServerResponse, Error.PlatformError>
  readonly fileWebResponse: (
    file: Body.Body.FileLike,
    options?: ServerResponse.Options.WithContent & FileSystem.StreamOptions
  ) => Effect.Effect<ServerResponse.ServerResponse>
}

Added in v1.0.0

tags

Platform

Signature

export declare const Platform: Context.Tag<Platform, Platform>

Added in v1.0.0

type ids

TypeId

Signature

export declare const TypeId: typeof TypeId

Added in v1.0.0

TypeId (type alias)

Signature

export type TypeId = typeof TypeId

Added in v1.0.0