Skip to content

Instantly share code, notes, and snippets.

@eiro
Created October 11, 2011 10:18
Show Gist options
  • Save eiro/1277764 to your computer and use it in GitHub Desktop.
Save eiro/1277764 to your computer and use it in GitHub Desktop.
compojure + hiccup "hello world"
; vim sw=4
(ns compas.core
(:use compojure.core)
(:use hiccup.core)
(:require
[compojure.route :as route]
[compojure.handler :as handler]
)
)
(defn page []
[:html
[:body
[:h1 "Welcome aboard"]
[:ul
(map #(vector :li %) [1 2 3 4 5])
]
]
]
)
(defroutes compas-routes
(GET "/" [] (html (page)))
(route/not-found (html (page)))
)
(def app (handler/site compas-routes))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment