Created
February 10, 2011 10:44
-
-
Save bobo/820290 to your computer and use it in GitHub Desktop.
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
(ns replproject.compojure | |
(:use compojure.core | |
ring.adapter.jetty) | |
(:require [compojure.route :as route] | |
[net.cgrand.enlive-html :as html])) | |
(html/deftemplate index "index.html" | |
[ctxt] | |
[:p#message] (html/content (:message ctxt) )) | |
( defroutes example | |
(GET "/test" [] (index {:message "works!"}) | |
)) | |
(run-jetty example {:port 8080 :join false}) |
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
<html> | |
<body> | |
<p id="message">not working</p> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment