SHARE
TWEET

Heroku / Clojure http.handler

a guest Jan 2nd, 2012 90 Never
  1. (ns http.handler
  2.   (:require
  3.     [ring.adapter.jetty :as jetty]
  4.     [compojure.handler :as handler] ))
  5.  
  6.  
  7. (def app
  8.   (handler/site main))
  9.  
  10. (defn -main []
  11.   (let [port (Integer/parseInt (System/getenv "PORT"))]
  12.     (jetty/run-jetty app {:port port})
  13.   ))
RAW Paste Data
Top