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

Express Routing enhancement #54

Open
3 of 4 tasks
Harper04 opened this issue Jan 29, 2019 · 1 comment
Open
3 of 4 tasks

Express Routing enhancement #54

Harper04 opened this issue Jan 29, 2019 · 1 comment
Assignees

Comments

@Harper04
Copy link
Contributor

Harper04 commented Jan 29, 2019

Currently routing takes a naive express way approach.
First registered first served. Because we are registering by file listing our routing is defined by that order.

So we have no way to control / know which of the following routes will be executed:
/*
/api
or:
/api/todo/:id
/api/todo/list

i see two ways:

  • adding a 'priority' number and sort by that

or:

  • make express routing testable
  • define a subset of valid path features (path params, wildcards at the end)
  • maybe test for unreachable routes
  • write a simple algorithm which determines the most specific route for conflicts and controls the order of the registration
@Aduril
Copy link
Contributor

Aduril commented Feb 18, 2019

PR: #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

No branches or pull requests

2 participants