Created
April 1, 2010 13:17
-
-
Save devn/351781 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
(defhtml application [text body] | |
[:html | |
[:head | |
[:title text]] | |
[:body | |
[:h3 text] | |
body]]) | |
(defhtml code-list [body] | |
[:ul body]) | |
(defhtml code-block [[code result]] | |
[:li [:pre code] [:pre ";; =>" result]]) | |
(defn test-fn* | |
[#^String text] | |
(response | |
(application text | |
(code-list (code-block text))))) | |
;; not working (yet) | |
(def test-web | |
(app | |
["examples" [text #".*"]] | |
{:get test-fn*} | |
[#".*"] {:get ["all routes!"]})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment