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

Study ways to better organize mappings #31

Open
ArnaudBuchholz opened this issue Oct 19, 2020 · 2 comments
Open

Study ways to better organize mappings #31

ArnaudBuchholz opened this issue Oct 19, 2020 · 2 comments
Assignees
Milestone

Comments

@ArnaudBuchholz
Copy link
Owner

When the list of mappings is big, the code becomes cumbersome.
Express proposes way to split the routing table into several chunks. It might be good to propose a similar mechanism through handlers.

@ArnaudBuchholz ArnaudBuchholz self-assigned this Oct 19, 2020
@ArnaudBuchholz
Copy link
Owner Author

{
  "mappings": [{
    "match": "^api/v1/",
    "mappings": [{
      "...": "..."
    }]
  }]
}

Open questions :

  • How to ensure multiple matching mappings are executed in the proper order (may not be able to flatten everything)

@ArnaudBuchholz
Copy link
Owner Author

Answer to last point : if I create a specific handler that internally use dispatch (or a modified version of it) on the given list of mapping :

  • If answered => end
  • If not answered => the normal processing of the request would continue

@ArnaudBuchholz ArnaudBuchholz added this to the Version 2.0 milestone Mar 22, 2024
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

No branches or pull requests

1 participant