Skip to content

Instantly share code, notes, and snippets.

@gzmask
Created June 6, 2013 20:28
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 gzmask/5724642 to your computer and use it in GitHub Desktop.
Save gzmask/5724642 to your computer and use it in GitHub Desktop.
(ns richeverpos.handler
(:use compojure.core
ring.adapter.jetty
richeverpos.index_page)
(:require [compojure.handler :as handler]
[compojure.route :as route]))
(defroutes app-routes
(GET "/" [] (index-page))
(route/resources "/")
(route/not-found "Not Found"))
(def app
(handler/site app-routes))
(defn handler [request]
{:status 200
:headers {"Content-Type" "text/html"}
:body (index-page)})
(def -main
(run-jetty #'handler {:port 3000 :join? false}))
(comment
(defonce server (run-jetty #'app {:port 3000 :join? false}))
(.stop server)
(.start server))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment