InitApiContext

class InitApiContext(val env: Environment, val apis: Apis, val data: MutableData, val events: Events, val logger: Logger)(source)

A container for a bunch of relevant utility classes that may be useful when starting up a server.

Constructors

Link copied to clipboard
constructor(env: Environment, apis: Apis, data: MutableData, events: Events, logger: Logger)

Properties

Link copied to clipboard
val apis: Apis

The parent Apis object, in case this method wants to register any additional API routes dynamically. This will be called AFTER methods annotated with Api have already been registered.

Link copied to clipboard

A data store which can optionally be used for storing rich data values that can then be read by @Api methods.

Link copied to clipboard

The current server environment, in case you need to branch logic in development vs production environments.

Link copied to clipboard

An interface to register custom events handlers that will be called during the lifetime of the server.

Link copied to clipboard