Skip to content

Instantly share code, notes, and snippets.

@mtnygard
Created January 15, 2011 20:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mtnygard/781194 to your computer and use it in GitHub Desktop.
Save mtnygard/781194 to your computer and use it in GitHub Desktop.
(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