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

Switched from routes to self-registering handlers. #59

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mikestefanello
Copy link
Owner

@mikestefanello mikestefanello commented Mar 30, 2024

Improvements:

  1. Use handlers that group related routes rather than individual routes with methods for each HTTP method.
  2. Allow handlers to self-register middleware, groups and routes rather than having a single method construct every single route.
  3. Inject the container via a method rather than initializing each handler individually.
  4. Use init() in each handler file to add itself to the list of handlers to add to the router (not sure about this)

Still need to update the README.

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.

None yet

1 participant