2017-10-31 09:46:59 +00:00
|
|
|
/**
|
|
|
|
* # Route Service
|
|
|
|
*
|
2017-11-09 10:08:11 +00: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:
|
|
|
|
* - keep track of the registered routes, and what they have mounted on them
|
|
|
|
* - provide a way for apps to register routes
|
2017-11-09 13:58:22 +00:00
|
|
|
* - expose base classes & registry to the rest of Ghost
|
2017-10-31 09:46:59 +00:00
|
|
|
*/
|
|
|
|
|
2017-11-09 13:58:22 +00:00
|
|
|
// This is the main router, that gets extended & mounted /site
|
|
|
|
module.exports.siteRouter = require('./site-router');
|
|
|
|
|
2017-11-09 10:08:11 +00:00
|
|
|
// We expose this via the App Proxy, so that Apps can register routes
|
|
|
|
module.exports.appRouter = require('./app-router');
|
2017-10-31 09:46:59 +00:00
|
|
|
|
2017-11-09 13:58:22 +00:00
|
|
|
// Classes for other parts of Ghost to extend
|
|
|
|
module.exports.ParentRouter = require('./ParentRouter');
|
|
|
|
|
|
|
|
module.exports.registry = require('./registry');
|