Provides access to the express app object. This can be used to do any low level express setup.

Show:

Methods

constructor () public

Inherited from Base: src/classes/base.js:14

Sets up mixins. When overriding the constructor, remember to call super()

init
(
  • app
)
public

Override the init method in any initializer to gain access to the express app.

Example:

init (app) {
    app.use(function (req, res, next) {
      next()
    })
  
    app.get('/version', function (req, res) {
      res.send({
        version: 2
      })
    })
  }
  

Parameters: