Skip to content

Instantly share code, notes, and snippets.

@bobo
Created February 10, 2011 10:44
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bobo/820290 to your computer and use it in GitHub Desktop.
Save bobo/820290 to your computer and use it in GitHub Desktop.
(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})
<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