code: function onRequest(request, response) {
    var self = this
    var end = response.end
    var parsed = parse(request.url, true)
  
    request.requestedAt = request.at = new Date().getTime()
    request.parsedUrl = parse(request.url, true)
    request.pathname = request.path = request.parsedUrl.pathname.replace(/\/\/+/g, '/')
    request.querystring = request.qs = qs.parse(request.parsedUrl.search.replace(/^\?/, ''))
    request.pause()
    request.timeout = setInterval(function () {
      response.writeHead(408)
      end.call(response)
      clearInterval(request.timeout)
      self.emit('timeout', request.url)
    }, this.timeout)
  
    response.end = function () {
      clearInterval(request.timeout)
      end.apply(this, arguments)
      self.emit('requestEnd', request.url, new Date().getTime() - request.requestedAt)
    }
  
    this.emit('requestStart', request.url, request.requestedAt)
    this.JSONTransport(request, response)
  
    var executionChain = this.router.get(request)
  
    if (!executionChain) {
      return response.serveJSON({
        success: false,
        reason: request.pathname + ' api not found'
      }, {
        httpStatusCode: 404,
      })
    }
  
    new Chain(executionChain, function (err) {
      if (err) {
        response.serveJSON({
          success: false,
          reason: 'something went wrong: ' + err,
          stack: err.stack
        }, {
          httpStatusCode: 500
        })
        self.emit('error', request.url, err)
      }
    }).call(request, response)
  }
docs: private