code: function (app, next) {
  
        if (hasDebug) {
  
          app.use(function (req, res, next) {
  
            var statusCode = res.statusCode === 200
              ? 200
              : ('' + res.statusCode).red;
            var cookies = _.keys(res.cookies).length
              ? '\n' + formatJSON(res.cookies, '  ')
              : '-';
            var body = _.keys(res.body).length
              ? '\n' + formatJSON(res.body, '  ')
              : '-';
  
            debug(''
              + 'res:'.magenta + '\n'
              + '  status : '.cyan + statusCode + '\n'
              + '  data   : '.cyan + body + '\n'
              + '  cookies: '.cyan + cookies
            );
  
            next();
  
          });
        }
  
        if (hasVerbose) {
  
          app.use(function (req, res, next) {
            verbose(''
              + '  length : ' + Buffer.byteLength(JSON.stringify(res.body || {})) + ' byte'
            );
            next();
          });
  
          app.use(morgan('' +
              // '  length : '.yellow + ':res[content-length] byte\\n' +
            '  timing : :response-time ms'.grey, {
            immediate: true
          }));
        }
  
        if (hasDebug) {
          app.use(function (req, res, next) {
            debug('\nWaiting for next request...\n');
            next();
          });
        }
  
        next(null, app);
      }
docs: middleware：print response