Bidi probably would work fine for what you want, but I'll also second the
reitit suggestion.

On Wed, Apr 21, 2021 at 4:54 PM Harold <hhaus...@gmail.com> wrote:

> >> ...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 dsblak...@gmail.com 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 clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> 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 clojure+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/clojure/fbd94185-4401-4311-85b3-639fafbbb787n%40googlegroups.com
> <https://groups.google.com/d/msgid/clojure/fbd94185-4401-4311-85b3-639fafbbb787n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
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 clojure+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/CAB_6y6FLk-Rf1Cs21_%2Be_aNA7DmCj1o0NqgDE50y%2BPgJNMr7Mg%40mail.gmail.com.

Reply via email to