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

Think about a composable router API #390

Open
joseferben opened this issue Feb 26, 2021 · 0 comments
Open

Think about a composable router API #390

joseferben opened this issue Feb 26, 2021 · 0 comments
Labels
question Further information is requested

Comments

@joseferben
Copy link
Contributor

At the moment, it is possible to define routers which then are given to the HTTP server. The router definition looks like

let site_router =
  Sihl.Web.Http.router
    ~middlewares:(Middleware.site ())
    ~scope:"/"
    [ list_todos; add_todos; do_todos ]
;;

.

It should be possible to nest routers. This is something that Opium should support, so consider opening a PR after testing the solution.

@joseferben joseferben added the question Further information is requested label Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant