what's the best way to route to one page if the user is signed in (i.e. session has a non-nil value for the user-id
key) and another if the user is not signed in? The ideal would be 2 different set of routes.
Thanks!
Also, are there any good example apps using compojure out there?
Ok, so figured this out. Routes in compojure are composable, so you can take a defroutes
handlers and feed it to another defroutes
handler.
http://vedang.me/techlog/2015/8/21/composability-and-compojure has a great explanation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With