Options
All
  • Public
  • Public/Protected
  • All
Menu

Class WebHost

Sets up an HTTP server, and generates an MRE context for your app to use.

Hierarchy

  • WebHost

Index

Constructors

Accessors

Methods

Constructors

constructor

  • new WebHost(options?: { baseDir?: string; baseUrl?: string; optionalPermissions?: Permissions[]; permissions?: Permissions[]; port?: string | number }): WebHost
  • Parameters

    • Default value options: { baseDir?: string; baseUrl?: string; optionalPermissions?: Permissions[]; permissions?: Permissions[]; port?: string | number } = {}
      • Optional baseDir?: string
      • Optional baseUrl?: string
      • Optional optionalPermissions?: Permissions[]
      • Optional permissions?: Permissions[]
      • Optional port?: string | number

    Returns WebHost

Accessors

adapter

baseDir

  • get baseDir(): string

baseUrl

  • get baseUrl(): string

Methods

registerStaticBuffer

  • registerStaticBuffer(filename: string, blob: Buffer, contentType?: string): string
  • Serve arbitrary binary blobs from a URL

    Parameters

    • filename: string

      A unique string ID for the blob

    • blob: Buffer

      A binary blob

    • Default value contentType: string = "application/octet-stream"

      The MIME type that identifies this blob

    Returns string

    The URL to fetch the provided blob