Clojure Ring wrap-reload is not working -


this core.clj file

(ns lein-app.core   (:require [compojure.core :refer :all]             [compojure.route :as route]             [ring.middleware.reload :refer [wrap-reload]]))  (use 'ring.adapter.jetty)  (defroutes app   (get "/" [] "<h1>hello world</h1>")   (route/not-found "<h1>not found</h1>"))  (def reloadable-app   (wrap-reload app))  (defn -main   []   (run-jetty reloadable-app {:port 3000})) 

and project.clj

(defproject lein-app "0.1.0-snapshot"   :description "fixme: write description"   :url "http://example.com/fixme"   :license {:name "eclipse public license"             :url "http://www.eclipse.org/legal/epl-v10.html"}   :dependencies [     [org.clojure/clojure "1.8.0"]     [compojure "1.5.2"]     [ring "1.5.0"]]    :main lein-app.core) 

when run lein run starts server correctly if change response else example need kill server , restart it.

as indicated in ring issue#104 doc not quite clear.

for wrap-reload (as similar functionality in other libs/projects) 1 has pass var not value.

like so

(wrap-reload #'app) 

Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -