Edit this topic

Express app

:

:

:

: /modules/core/express/lib/express-app.js

: https://github.com/DecentCMS/DecentCMS/blob/master/modules/core/express/lib/express-app.js

ExpressApp

Kind: global class

new ExpressApp(app)

Wraps an Express application so prioritized middleware can be added.

Param Description
app The Express app.

expressApp.register(priority, registration)

Adds a prioritized registration function. Registration functions will be added in order of growing priority.

Kind: instance method of ExpressApp

Param Type Description
priority Number The priority of the registration.
registration function The function that does the registration. Takes the Express app as its parameter.

expressApp.lock()

Locks the application so no new registration can be done. Executes all the registration functions in priority order.

Kind: instance method of ExpressApp