code: function expandDefinition(app, name, route) {
    if (!route)
      return null;
    var label = niceName(name);
    if (typeof route === 'function') {
      return {
        app: app,
        get: [route],
        label: label
      }
    } else if (Array.isArray(route)) {
      var path = undefined, funcs;
      if (typeof route[0] !== 'string') {
        funcs = route;
      } else {
        path = route[0];
        funcs = route.slice(1);
      }
      return {
        app: app,
        path: path,
        get: funcs,
        label: label
      }
    } else if (route.route) { //nested routes
      debugger; //XXX
    } else {
      var def = {
        app: app,
        path: route.path,
        label: route.label || label
      };
      var found = false;
      for (var key in route) {
        if (key == "path" || key == 'app' || !app[key])
          continue;
        def[key] = (!route[key] || Array.isArray(route[key])) ? route[key] : [route[key]];
        found = true;
      }
      if (!found) {
        def.pathonly = true;
        if (typeof route.path === 'undefined')
          def.path = name
      }
      return def;
    }
  }
docs: /*
  If path is omitted the name of the route is used as the path
  If method is ommitted, GET is used