Skip to content

Instantly share code, notes, and snippets.

@danneu
Last active December 26, 2015 15:29
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 danneu/7173399 to your computer and use it in GitHub Desktop.
Save danneu/7173399 to your computer and use it in GitHub Desktop.
(ns _.handler
(:require [ring.adapter.jetty :refer [run-jetty])
(:gen-class)
;; ... Routes and stuff ...
(def app
(handler/site app-routes))
;; Server
(defn start-server [port]
(run-jetty app {:port port}))
(defn -main [& args]
(let [port (Integer. (or (first args) "5002"))]
(start-server port)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment