Options
All
  • Public
  • Public/Protected
  • All
Menu

Akera Web Handler

Index

Type aliases

WebConfig

WebConfig: object

Type declaration

Functions

middleware

  • The default function that creates an akera.io Web Handler middleware that can be used on an Express application.

    If other REST interfaces are used beside the Web Handler one it is best to create an instance of AkeraWeb and use that as input to REST middleware services instead of just passing the broker configuration, that way the connections are re-used between different services. Use the mount method to get the Web Handler router.

    Parameters

    • config: IBrokerConfig | Array<IBrokerConfig> | IBroker

      Can be one or an array of broker configuration for remote brokers or a broker instance when running embedded into the application server.

    • Optional logger: AkeraLogger

      An instance of [AkeraLogger] to be used by the router for logging.

    • Default value poolSize: number = 0

      The size of connections pool, if set to zero no pooling is used.

    Returns express.Router