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

Parse scope as rule #138

Open
arteymix opened this issue Nov 10, 2015 · 1 comment
Open

Parse scope as rule #138

arteymix opened this issue Nov 10, 2015 · 1 comment
Labels

Comments

@arteymix
Copy link
Member

The idea is very simple: empower scope with rule capabilities.

app.scope ("user/<int:id>", (user) => {
    app.get ("posts", (req, res, next, stack) => {
        var id = stack.pop_tail ().get_string ();
    });
});

They should get compiled down to regular expression and then concatenated with the inner representation so that they can be compatible with regex matchers.

@arteymix arteymix added this to the 0.3.0 milestone Nov 10, 2015
arteymix added a commit that referenced this issue Nov 13, 2015
The rule compilation code has been refactored to be reused for both
scopes and rules.
arteymix added a commit that referenced this issue Jan 9, 2016
The rule compilation code has been refactored to be reused for both
scopes and rules.
arteymix added a commit that referenced this issue Jan 9, 2016
The rule compilation code has been refactored to be reused for both
scopes and rules.
@arteymix
Copy link
Member Author

It is working with Router.rule.

Now remain the question: do we want that for regular expression as well?

@arteymix arteymix modified the milestone: 0.3.0 Oct 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant