This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-07-29
Channels
- # aleph (2)
- # bangalore-clj (1)
- # beginners (9)
- # boot (18)
- # clara (3)
- # cljs-dev (21)
- # cljsjs (2)
- # clojure (137)
- # clojure-spec (2)
- # clojurescript (65)
- # clr (1)
- # copenhagen-clojurians (11)
- # core-async (20)
- # datascript (3)
- # lein-figwheel (1)
- # leiningen (4)
- # luminus (4)
- # lumo (1)
- # off-topic (38)
- # onyx (1)
- # parinfer (4)
- # pedestal (9)
- # protorepl (8)
- # re-frame (4)
- # reagent (92)
- # ring-swagger (2)
- # rum (1)
- # unrepl (40)
- # vim (16)
- # yada (1)
how do I actually get code reloading to work in Pedestal?
I just used the default template and used run-dev
(defn run-dev
"The entry-point for 'lein run-dev'"
[& args]
(println "\nCreating your [DEV] server...")
(-> service/service ;; start with production configuration
(merge {:env :dev
;; do not block thread that starts web server
::server/join? false
;; Routes can be a function that resolve routes,
;; we can use this to set the routes to be reloadable
::server/routes #(route/expand-routes (deref #'service/routes))
;; all origins are allowed in dev mode
::server/allowed-origins {:creds true :allowed-origins (constantly true)}})
;; Wire up interceptor chains
server/default-interceptors
server/dev-interceptors
server/create-server
server/start))
but it doesn't seem to be reload the code no matter what I do
I'm actually running the server in the terminal and use Emacs+cider, so the two things are not actually linked up, but I thought it would still reload when some code changes anyway
hmm… pedestal doesn’t work with the latest clojure.spec
? 0.5.2
fails with [org.clojure/clojure "1.9.0-alpha17"]
due to a broken ns-form.
@andrea.crotti 1. Start emacs, 2. cider-jack-in 3. from in emacs from the cider-repl do (dev-run)