app/App.js
/**
   *  Register a route, a route is treated as a route group or a route object
   *  route groups contain more routes and route groups, whereas routes are final
   *  and contain reference to a controller and method on that controller.
   *
   *  @param {object} route
   *  @param {object} path
   *  @param {array} scopes
   *  @param {object} resourceSchema Resource schema for the route, cascades through
   *                                 groups.
   *
   *  @throws {Error} If the route item is neither a route or a route group as defined
   *                  by the objects properties
   *                  
   *  @return {object} Return the route
   */
Register a route, a route is treated as a route group or a route object
route groups contain more routes and route groups, whereas routes are final
and contain reference to a controller and method on that controller.

@param {object} route
@param {object} path
@param {array} scopes
@param {object} resourceSchema Resource schema for the route, cascades through
groups.

@throws {Error} If the route item is neither a route or a route group as defined
by the objects properties

@return {object} Return the route
Register a route a route is treated as a route group or a route object route groups contain more routes and route groups whereas routes are final and contain reference to a controller and method on that controller . @param { object } route @param { object } path @param { array } scopes @param { object } resourceSchema Resource schema for the route cascades through groups . @throws { Error } If the route item is neither a route or a route group as defined by the objects properties @return { object } Return the route
registerRoute(route, path, scopes, resourceSchema) {
    scopes = scopes || [];
    path = path || '';
    resourceSchema = resourceSchema || [];
    if(typeof route.getRoutes === 'function') {
      route.getRoutes().map((r) => this.registerRoute(
        r,
        this.concatRoutePath(path, r.path || ''),
        scopes.concat(route.scopes || []),
        route.resourceSchema || resourceSchema
      ));
    } else if(route.controller !== undefined) {
      route.resourceSchema = route.resourceSchema || resourceSchema;
      route.scopes = scopes.concat(route.scopes || []);
      route.path = this.concatRoutePath(path, route.path || '');
      this.bindRoute(route);
    } else {
      throw new Error('route `' + path + '` is invalid and does not contain sub routes or a callback');
    }
    return route;
  }
registerRoute ( route , path , scopes , resourceSchema ) { scopes = scopes || [ ] ; path = path || '' ; resourceSchema = resourceSchema || [ ] ; if ( typeof route . getRoutes === 'function' ) { route . getRoutes ( ) . map ( ( r ) => this . registerRoute ( r , this . concatRoutePath ( path , r . path || '' ) , scopes . concat ( route . scopes || [ ] ) , route . resourceSchema || resourceSchema ) ) ; } else if ( route . controller !== undefined ) { route . resourceSchema = route . resourceSchema || resourceSchema ; route . scopes = scopes . concat ( route . scopes || [ ] ) ; route . path = this . concatRoutePath ( path , route . path || '' ) ; this . bindRoute ( route ) ; } else { throw new Error ( 'route `' + path + '` is invalid and does not contain sub routes or a callback' ) ; } return route ; }
Register a route, a route is treated as a route group or a route object
  route groups contain more routes and route groups, whereas routes are final
  and contain reference to a controller and method on that controller.
Register a route a route is treated as a route group or a route object route groups contain more routes and route groups whereas routes are final and contain reference to a controller and method on that controller .