Class ApiLambdaApp

Impementation of the ApiApp class that handles native AWS Lambda requests and can be used to provide a Lambda function handler.

The run method is the function handler entrypoint.

Hierarchy

Constructors

  • Create a new lambda app.

    Parameters

    • Optional controllersPath: string[]

      (Optional) Paths to the directories that contain controller js files. Required if the default Container is used, or the provided Container instance has its autoBindInjectable flag set to true. Ignored if the provided Container instance has its autoBindInjectable flag set to false.

    • Optional appConfig: AppConfig

      (Optional) Application config to pass to lambda-api.

    • Optional appContainer: Container

      (Optional) InversifyJS IOC Container instance which can build controllers and error interceptors.

    Returns ApiLambdaApp

Properties

apiServer: Server
appConfig: AppConfig = ...

(Optional) Application config to pass to lambda-api, defaults to new AppConfig.

appContainer: Container = ...

(Optional) InversifyJS IOC Container instance which can build controllers and error interceptors, defaults to new Container with autoBindInjectable flag set to true.

controllersPath?: string[]

(Optional) Paths to the directories that contain controller js files that declare controllers. Required if the default Container is used, or the provided Container instance has its autoBindInjectable flag set to true. Ignored if the provided Container instance has its autoBindInjectable flag set to false.

initialised: boolean
logFactory: LogFactory
logger: ILogger

Accessors

Methods

  • Configure the API instance from the lambda-api package.

    Parameters

    • configureBlock: ((this, api) => void)
        • (this, api): void
        • Parameters

          • this: void
          • api: API

          Returns void

    Returns void

  • Configure the InversifyJS IOC Container instance.

    Parameters

    • configureBlock: ((this, container) => void)

      Function that takes a Container instance as a parameter.

        • (this, container): void
        • Parameters

          • this: void
          • container: Container

          Returns void

    Returns void

Generated using TypeDoc