Created
October 24, 2009 16:51
-
-
Save christianberg/217623 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 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