AppUnit

libflitter/app/AppUnit~ AppUnit

The app unit is the final unit in the stack, and makes the final call to the Express HTTP server. As such, it is the innermost context which the Flutter application can access. No other units after this will show up to the Flutter components.

Constructor

new AppUnit()

Source:

Extends

Methods

(async) cleanup(app) → {Promise.<void>}

Source:
Inherited From:

Cleans up the unit's resources before Flitter closes.

Parameters:
Name Type Description
app module:libflitter/app/FlitterApp~FlitterApp

the Flitter app

Returns:
Type
Promise.<void>

directories() → {Object}

Source:
Inherited From:

Get the directories provided by the unit. Should be an object such that key => value is the name of the directory => fully qualified path to the directory.

Returns:
Type
Object

(async) go(app) → {Promise.<void>}

Source:
Overrides:

Loads the unit. Launches the HTTP server.

Parameters:
Name Type Description
app module:libflitter/app/FlitterApp~FlitterApp

the Flitter app

Returns:
Type
Promise.<void>

name() → {string}

Source:
Overrides:

Get the name of the unit.

Returns:

"App"

Type
string

serve_express(app) → {Promise.<any>}

Source:

Launch an HTTP server from the underlying Express app on the port configured by the config value "server.port".

Parameters:
Name Type Description
app module:libflitter/app/FlitterApp~FlitterApp

the Flitter app to be served

Returns:
Type
Promise.<any>