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:
Overrides:

Closes the session store's DB connection.

Parameters:
Name Type Description
app module:libflitter/app/FlitterApp~FlitterApp
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>

migrations() → {string}

Source:

Get the fully-qualified path to the migrations provided by this unit.

Returns:
Type
string

name() → {string}

Source:
Overrides:

Get the name of the unit.

Returns:

"express"

Type
string