-
-
Notifications
You must be signed in to change notification settings - Fork 134
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
More elaborate routing (e.g. match only ints, etc.) #122
Comments
dream-routes from @ulrikstrid adapts @anuragsoni's Routes to Dream: let () =
Dream.run
@@ Dream.logger
@@ Dream_routes.routes Routes.[
empty @--> (fun _request ->
Dream.html "Good morning, world!");
s "echo" / int /? nil @--> (fun integer _request ->
Dream.html @@ Printf.sprintf "integer: %i" integer);
s "echo" / str /? nil @--> (fun word _request ->
Dream.html word);
]
@@ Dream.not_found |
Would you like a PR to Community Projects section in README? |
Note that @thangngoc89 I think the community projects is a list of vetted projects that are actually recommended. So I guess a issue to ask for inclusion is what should happen 🙂 |
I think after dream-routes supports methods, and after a bit of review, we can add it to the list. |
For example, allow a way to check that
:id
in/blah/:id
is an integer before matching the route.cc @jsthomas @c-cube for interest.
The text was updated successfully, but these errors were encountered: