src/route.js
function generate() {
  for(const i in Routes) {
    if(!Routes[i].generated) {
      Routes[i] = generateController(path.controllers, Routes[i]);
    }
  }

  for(const i in MiddleWares) {
    MiddleWares[i] = generateController(path.middlewares, MiddleWares[i]);
  }

  for(const i in GlobalMiddleWares) {
    GlobalMiddleWares[i] = generateController(path.middlewares, GlobalMiddleWares[i]);
  }

  for(const i in ErrorsHandler) {
    ErrorsHandler[i] = generateController(path.errorHandler, ErrorsHandler[i]);
  }

  for(const i in Services) {
    Services[i] = generateService(path.services, Services[i]);
  }
}
function generate() {
  for(const i in Routes) {
    if(!Routes[i].generated) {
      Routes[i] = generateController(path.controllers, Routes[i]);
    }
  }

  for(const i in MiddleWares) {
    MiddleWares[i] = generateController(path.middlewares, MiddleWares[i]);
  }

  for(const i in GlobalMiddleWares) {
    GlobalMiddleWares[i] = generateController(path.middlewares, GlobalMiddleWares[i]);
  }

  for(const i in ErrorsHandler) {
    ErrorsHandler[i] = generateController(path.errorHandler, ErrorsHandler[i]);
  }

  for(const i in Services) {
    Services[i] = generateService(path.services, Services[i]);
  }
}
function generate ( ) { for ( const i in Routes ) { if ( ! Routes [ i ] . generated ) { Routes [ i ] = generateController ( path . controllers , Routes [ i ] ) ; } } for ( const i in MiddleWares ) { MiddleWares [ i ] = generateController ( path . middlewares , MiddleWares [ i ] ) ; } for ( const i in GlobalMiddleWares ) { GlobalMiddleWares [ i ] = generateController ( path . middlewares , GlobalMiddleWares [ i ] ) ; } for ( const i in ErrorsHandler ) { ErrorsHandler [ i ] = generateController ( path . errorHandler , ErrorsHandler [ i ] ) ; } for ( const i in Services ) { Services [ i ] = generateService ( path . services , Services [ i ] ) ; } }
Generate controller of all routes & middlewares
Generate controller of all routes & middlewares