GridFsUnit

flitter-gridfs/GridFsUnit~ GridFsUnit

Adds the GridFS file model and functionality to the Flitter app.


Constructor

new GridFsUnit()

Extends

  • libflitter/Unit~Unit

Members

(static) name

Get the name of the service provided by this unit.

(static) services

Defines the services required by this unit.

Methods

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

Clean up the unit's resources. Closes the native MongoDB connection.

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

the current Flitter app

Returns:
Type
Promise.<void>

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

Initialize a native MongoDB connection and create a GridFS bucket. Also, register the GridFS file model to the application. ("gridfs::file")

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

the Flitter application to be bootstrapped

Returns:
Type
Promise.<void>