The LambdaServer wraps a Node.js Lambda routine in a simple HTTP service.

It makes it easy to test Lambdas locally, and in conjunction with our other tools.

To use it, simply provide the filename of the Lambda function along with the port the HTTP server should listen on.

### Hierarchy

- LambdaServer

## Index

### Constructors

- constructor

### Methods

- start
- stop

## Constructors

### constructor

- new LambdaServer(file?: string, port?: number, verbose?: boolean, functionName?: string): LambdaServer

- - Defined in client/lambda-server.ts:22

  Creates a server that exposes a Lambda as an HTTP service

  #### Parameters

  - ##### Optional file: string

    The file the defines the Lambda

  - ##### Optional port: number

    The port the service should listen on

  - ##### Optional verbose: boolean

    Prints out verbose information about requests and responses

  - ##### Optional functionName: string

    Use the named function as opposed to the default ("handler")

  #### Returns LambdaServer

## Methods

### start

- start(callback?: function): void

- - Defined in client/lambda-server.ts:38

  Starts the LambdaServer listening on the port specified in the constructor.

  #### Parameters

  - ##### Optional callback: function

    Called once the server has started successfully

    - - (): void

      - #### Returns void

### stop

- stop(onStop?: function): void

- - Defined in client/lambda-server.ts:77

  Stops the lambda service

  #### Parameters

  - ##### Optional onStop: function

    Callback when all sockets related to the LambdaServer have been cleaned up

    - - (): void

      - #### Returns void

Generated using TypeDoc