Created
May 28, 2015 05:09
-
-
Save jclosure/de7e0f9ba12dd0af6ff5 to your computer and use it in GitHub Desktop.
starting and stopping jetty from inside an nrepl session
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
(use 'ring.adapter.jetty) | |
(defn app-handler [request] | |
{:status 200 | |
:headers {"Content-Type" "text/html"} | |
:body (str request)}) | |
(defonce server (run-jetty #'app-handler {:port 3000 :join? false})) | |
(.start server) | |
;; (.stop server) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment