Skip to content

Instantly share code, notes, and snippets.

@billdozr
Created December 16, 2011 07:37
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 billdozr/1484983 to your computer and use it in GitHub Desktop.
Save billdozr/1484983 to your computer and use it in GitHub Desktop.
(ns myprj.data.core
(:require myprj.data.conf :as conf]
[myprj.data.routes :as routes])
(:use [ring.adapter.jetty :only [run-jetty]]))
(let [port (Integer/parseInt (get (System/getenv) "PORT" "8080"))]
(defonce ^:dynamic *server* (run-jetty #'routes/core
{:port port :join? false
:host (:domain conf/site)})))
(defn start [] (.start *server*))
(defn stop [] (.stop *server*))
(defn -main
"Entry point for the web application"
[]
(do (stop) (start)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment