Last active
December 26, 2015 15:29
-
-
Save danneu/7173399 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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