lib/services/attachRoutes.js
function attachRoutes(router, routes = [], site) {
  routes.forEach((route) => {
    parseHandler(router, route, site);
  });

  return router;
}
function attachRoutes(router, routes = [], site) {
  routes.forEach((route) => {
    parseHandler(router, route, site);
  });

  return router;
}
function attachRoutes ( router , routes = [ ] , site ) { routes . forEach ( ( route ) => { parseHandler ( router , route , site ) ; } ) ; return router ; }
Parses and attach all routes to the router.
@param {Router} router
@param {Object[]} routes
@param {Object} site
@param {Array} reservedRoutes
@return {Router}
Parses and attach all routes to the router .