>> ...is intended for use with Ring middleware, HTTP servers...
>
> sorta made me think it wouldn't work in a non-web app.
>
Understood.
One of the coolest things about bidi is that it's just functions that
operate on data.
Nothing ring, web, or http specific going on here:
> (require 'bidi.bidi)
nil
> (bidi.bidi/match-route ["/foo" :bar] "/foo")
{:handler :bar}
> (bidi.bidi/match-route [["/foo/" :id] :bar] "/foo/17")
{:route-params {:id "17"}, :handler :bar}
> (bidi.bidi/path-for [["/foo/" :id] :bar] :bar :id 17)
"/foo/17"
---
Hope that helps,
-Harold
On Tuesday, April 20, 2021 at 8:35:11 PM UTC-6 [email protected] wrote:
> Cool. I thought about bidi but this:
>
> ...is intended for use with Ring middleware, HTTP servers...
>
> sorta made me think it wouldn't work in a non-web app.
>
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/clojure/fbd94185-4401-4311-85b3-639fafbbb787n%40googlegroups.com.