2017-10-31 12:46:59 +03:00
|
|
|
/**
|
|
|
|
* # Route Service
|
|
|
|
*
|
2017-11-09 13:08:11 +03:00
|
|
|
* Note: routes are patterns, not individual URLs, which have either
|
|
|
|
* subrouters, or controllers mounted on them. There are not that many routes.
|
|
|
|
*
|
|
|
|
* The route service is intended to:
|
|
|
|
* - handle the mounting of all the routes throughout the bootup sequence
|
|
|
|
* - keep track of the registered routes, and what they have mounted on them
|
|
|
|
* - provide a way for apps to register routes
|
|
|
|
* - keep routes being served in a sane order
|
|
|
|
*
|
|
|
|
* The route service does not handle:
|
|
|
|
* - redirects
|
|
|
|
* - assets
|
|
|
|
* These both happen prior to the routeService router being mounted
|
2017-10-31 12:46:59 +03:00
|
|
|
*/
|
|
|
|
|
2017-11-09 13:08:11 +03:00
|
|
|
// We expose this via the App Proxy, so that Apps can register routes
|
|
|
|
module.exports.appRouter = require('./app-router');
|
|
|
|
// This is the main router, that gets mounted in the express app in /site
|
|
|
|
module.exports.router = require('./site-router');
|
2017-10-31 12:46:59 +03:00
|
|
|
|