* @static * Allow developers to customize each request with inversion of control/dependency injection
(api, options)
| 286 | * Allow developers to customize each request with inversion of control/dependency injection |
| 287 | */ |
| 288 | static applyRequestContextMiddleware(api, options) { |
| 289 | if (options.requestContextMiddleware) { |
| 290 | if (typeof options.requestContextMiddleware !== 'function') { |
| 291 | throw new Error('requestContextMiddleware must be a function'); |
| 292 | } |
| 293 | api.use(options.requestContextMiddleware); |
| 294 | } |
| 295 | } |
| 296 | /** |
| 297 | * @static |
| 298 | * Create an express app for the parse server |