Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework route service responsibilities #9229

Merged
merged 7 commits into from
Nov 9, 2017
Merged

Conversation

ErisDS
Copy link
Member

@ErisDS ErisDS commented Nov 9, 2017

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 🎉

@ErisDS ErisDS changed the title Rework route service to prevent circular dependencies Rework route service responsibilities Nov 9, 2017
@ErisDS ErisDS merged commit 016ee17 into TryGhost:master Nov 9, 2017
@ErisDS ErisDS deleted the route-service branch November 9, 2017 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant