Created
January 15, 2011 20:02
-
-
Save mtnygard/781194 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 webui.core | |
(:use compojure.core | |
ring.adapter.jetty | |
compojure.response | |
[ring.util.response :only (response content-type)] | |
fleet) | |
(:require [compojure.route :as route]) | |
(:gen-class)) | |
(fleet-ns views "templates") | |
(extend-protocol Renderable | |
fleet.util.CljString | |
(render [this _] (response (.toString this)))) | |
(defroutes main-routes | |
(GET "/" [] (views/index)) | |
(route/not-found "<h1>Page not found</h1>")) | |
(defn -main [& args] | |
(run-jetty main-routes {:port 8080})) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment