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

Group feature #50

Open
predetermined opened this issue Mar 21, 2021 · 4 comments
Open

Group feature #50

predetermined opened this issue Mar 21, 2021 · 4 comments
Labels
enhancement New feature or request suggestion Suggest a feature

Comments

@predetermined
Copy link
Owner

I think a group feature would be cool.
It should maybe have some of the following features.

  • Prefix
  • Middleware

Maybe something like:

app.group((context) => {
    context.get(...);
    ....
});
@predetermined predetermined added enhancement New feature or request suggestion Suggest a feature labels Mar 21, 2021
@LoganTann
Copy link

I really don't think if this is the style of code intended for this project, but I love decorators like they are used in Spring

Why not trying to create this as a side project :

@Controller("hello")
export default class students {
  @get("/")
  public static getStudent(req) {
     return "hello world";
  }
  @get("/:name")
  public static getStudent(req) {
     return `hello, ${req.parameters.name} !`;
  }
}

@felixfong227
Copy link
Contributor

This looks very NestJS-ish, maybe it might go against the idea of being a minimal framework?

@LoganTann
Copy link

This looks very NestJS-ish, maybe it might go against the idea of being a minimal framework?

Exactly, that's why I talked about the idea of create such structure as a personal project instead of directly implementing this in aqua 😊

@felixfong227
Copy link
Contributor

having decorators would definitely make the code much more readable from my personal opinion

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request suggestion Suggest a feature
Projects
None yet
Development

No branches or pull requests

3 participants