-
-
Save ordnungswidrig/847630a9e5cf25d03421 to your computer and use it in GitHub Desktop.
Dynamically configurable routing to handlers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; name is like foo.bar.baz/myhandler | |
(defn set-handler-from-name! [name] | |
(let [f (ns-resolve *ns* (symbol name))] | |
(dosync (set! @handler f)) | |
(defn serlvet [req] | |
(@handler req)) | |
(defservice servlet) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment