ExpressUnit

libflitter/express/ExpressUnit~ ExpressUnit

The Express unit is responsible for injecting the 3rd-party tools that Flitter makes available into the underlying Express framework so they can be used in lower contexts. Currently, that includes the body parser and session store.

Constructor

new ExpressUnit()

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. Registers the 'busboy-body-parser' and 'express-session' packages with the underlying Express app.

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:

"express"

Type
string