Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AlbApp

Simple console application that hosts an express HTTP server that simulates an AWS ALB.

A request is mapped from the HTTP request to a lambda target, the response from invoking the lambda is mapped to a standard HTTP response and returned to the express client.

Hierarchy

  • AlbApp

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Protected Readonly expressApp

expressApp: Application

Static Readonly APP_OPTIONS

APP_OPTIONS: any[] = [{alias: "c",description: "Path to the JSON configuration file",name: "config",type: String}, {alias: "h",defaultValue: "*",description: "Host to listen on (defaults to all)",name: "host",type: String}, {alias: "p",defaultValue: 8080,description: "Port to listen on (defaults to 8080)",name: "port",type: Number}, {alias: "o",defaultValue: "*",description: "CORS origin to accept (default is to accept any origin)",name: "corsOrigin",type: String}, {alias: "d",defaultValue: false,description: "Enable debug logging",name: "debug",type: Boolean}]

Methods

runServer

  • runServer(args: string[]): Promise<void>
  • Starts the express server.

    Parameters

    • args: string[]

      Command line arguments for this server, equivalent to process.argv.splice(2). See --help for more info.

    Returns Promise<void>

stopServer

  • stopServer(): Promise<void>

Generated using TypeDoc