code: async function createApp(middlewareConfig) {
    const app = new Koa()
  
    const middleware = await setupMiddleware(middlewareConfig, app)
  
    if (app.env == 'production') {
      app.proxy = true
    }
  
    return {
      app,
      middleware,
    }
  }
docs: Create an application and setup middleware.
  @param {MiddlewareConfig} middlewareConfig