2021-10-04 18:50:07 +03:00
|
|
|
const helperService = require('../../services/helpers');
|
2020-03-23 22:43:01 +03:00
|
|
|
const routingService = require('../../services/routing');
|
2020-03-20 11:58:26 +03:00
|
|
|
|
|
|
|
module.exports.getInstance = function getInstance() {
|
|
|
|
const appRouter = routingService.registry.getRouter('appRouter');
|
|
|
|
|
|
|
|
return {
|
2021-10-04 18:50:07 +03:00
|
|
|
helperService: {
|
|
|
|
registerAlias: helperService.registerAlias.bind(helperService),
|
|
|
|
registerHelper: helperService.registerHelper.bind(helperService),
|
|
|
|
registerDir: helperService.registerDir.bind(helperService)
|
2020-03-20 11:58:26 +03:00
|
|
|
},
|
|
|
|
// Expose the route service...
|
|
|
|
routeService: {
|
|
|
|
// This allows for mounting an entirely new Router at a path...
|
|
|
|
registerRouter: appRouter.mountRouter.bind(appRouter)
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|