Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Heroku / Clojure http.handler

By: a guest on Jan 2nd, 2012  |  syntax: Clojure  |  size: 0.27 KB  |  views: 89  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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.   ))