Skip to content

Instantly share code, notes, and snippets.

@christianberg
Created October 24, 2009 16:51
Show Gist options
  • Save christianberg/217623 to your computer and use it in GitHub Desktop.
Save christianberg/217623 to your computer and use it in GitHub Desktop.
(ns blog
(:use compojure.http.routes)
(:use compojure.http.servlet)
(:use compojure.server.jetty)
(:use compojure.html))
(defn show-main-page []
"Hello World!")
(defn page-not-found []
[404 "The page you requested does not exist."])
(defroutes main-routes
(GET "/" (show-main-page))
(ANY "/*" (page-not-found)))
(def server
(run-server {:port 8080}
"/*" (servlet main-routes)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment