mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-19 16:42:17 +03:00
016ee17ebb
refs #9192, refs #9178 After trying to progress with current implementation, it became clear that the route service can't control the boot sequence, because then we end up with circular dependencies between the route service and the channel service. The route service now exposes: - a siteRouter - a way for apps to register routes. - ParentRouter base class for other modules to use - the registry ... - moved the default route setup back to site/routes.js 🙈 - moved the parent channel router back to the channel service (this makes way more sense imo) - this structure prevents circular dependencies - split the registry out into it's own thing - fixed-up various bits of tests and comments - DEBUG will print a list of routes 🎉
14 lines
371 B
JavaScript
14 lines
371 B
JavaScript
/**
|
|
* # Channel Service
|
|
*
|
|
* The channel service is responsible for:
|
|
* - maintaining the config of available Channels
|
|
* - building out the logic of how an individual Channel works
|
|
* - providing a top level router as an entry point
|
|
*
|
|
* Everything else exposed via the Channel object
|
|
*/
|
|
|
|
// Exports the top-level router
|
|
module.exports = require('./parent-router');
|