code: function createRule(path, handle, rulePath, changeOrigin) {
    let tmp = path.split(/\s+/);
    let method = 'all';
    let query = {};
  
    if (tmp[0] && tmp[1]) {
      method = tmp[0].toLowerCase();
      tmp[1] = tmp[1].replace(/#.*$/, '');
  
      let arr = tmp[1].split('?');
      path = arr[0];
      query = querystring.parse((arr[1] || ''));
    }
    if (!path.startsWith('/')) { //当用户在nei上设置路径不以"/"开头时，应加上"/"，否则路由匹配不上
      path = "/" + path;
    }
    // 生成正则
    let regexp = path2reg(path);
    // 包装路由处理句柄
    if(handle.data && handle.data.isFile){
      handle = require.resolve('./file_temp.png');
    }
    handle = processHandle(handle, rulePath, changeOrigin);
  
    return {
      method: method,
      path: path,
      regexp: regexp,
      keys: regexp.keys, // 针对带参数的路由
      handle: handle,
      query: query // 查询参数
    };
  }
docs: 创建路由对象