-
-
Notifications
You must be signed in to change notification settings - Fork 103
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
Router Engine #12
Comments
So I, for one, want to make the path syntax pluggable, and I'm not sure if that's in line with what you want. Otherwise, I'm always for more splitting of stuff. What part were you think of? |
I think that making the paths pluggable is a fantastic idea. My specific use case is negated glob-type routes. |
I want URL template-style routes. Not sure if that's what you mean by "glob-style" :) |
Not sure what you mean by template-style. By glob-style I mean "!/*/assets/.js" |
Gotcha. URL templates are RFC 6570 (simple example: |
Is it much work to make the paths pluggable? |
I haven't yet tried, but it shouldn't be too hard. I definitely intend to make the paths pluggable (more than just providing a |
Cool. Looking forward to it. Router has become indispensable for us and creating middleware chains. |
@dougwilson Great, I'll see after and during the development what is similar between the modules and we can factor out. I'm also going to be building it with first-class promise support, so I'll need to see where that fits in with this. |
Cool. So one thing I'm looking forward to is to see if the "io.js" project causes some more movement within Node.js. Because things like potential ES7 |
So, this is going to be solved by #13? Any docs on that branch? |
@scottcorgan It'll fix the engine issue by allowing your own match function to be used. The implementation using |
What would that look like? |
Check out https://github.com/blakeembrey/router/blob/router-engine/index.js You'll need to implement the methods for |
@dougwilson Cheers for moving away from Express and creating PillarJS! That's what open source means! // app.js
app.get('/workspace/:workspaceID/project/:projectID/user/:userID', function(req, res, next) { // ... <!-- view.html; if using any some kind of templating engine -->
<a href="/workspace/{{ workspace.id }}/project/{{ project.id }}/user/{{ user.id }}>link</a>
// not to mention creation of a link via pure js:
href = "/workspace/" + workspace.id + "/project/" + project.id + "/user/" + user.id If I want to change So if you have some spare time - I would love to have this feature, and I'm sure tons of others are needing it too. I would love to contribute, but the more I dive into the Router, the more I'm smashing my head in the wall, as it's so absurd.. |
@fourpixels Sounds like you should open a new issue that can be tagged as |
Yeah, sorry about that. I just saw a router ideas issue, so I didn't want to mess things around before knowing what you guys think. Will open one next with better description, you can delete my posts here :) |
I need to implement a router similar to this one, but with different path matching semantics. Is there any plan to abstract the core logic into an engine module that other implementations can use?
The text was updated successfully, but these errors were encountered: