This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-01-11
Channels
- # ai (1)
- # announcements (59)
- # aws (3)
- # babashka (16)
- # beginners (36)
- # calva (29)
- # cider (7)
- # clj-kondo (33)
- # clojure (77)
- # clojure-austin (1)
- # clojure-australia (4)
- # clojure-europe (16)
- # clojure-france (7)
- # clojure-nl (2)
- # clojure-spec (1)
- # clojure-sweden (8)
- # clojure-uk (4)
- # clojurescript (17)
- # cloverage (4)
- # conjure (2)
- # cursive (3)
- # datomic (22)
- # emacs (16)
- # fulcro (10)
- # graphql (3)
- # helix (13)
- # jobs (1)
- # kaocha (1)
- # lsp (7)
- # malli (1)
- # nextjournal (1)
- # off-topic (32)
- # pedestal (8)
- # polylith (5)
- # reitit (4)
- # reveal (1)
- # shadow-cljs (67)
- # spacemacs (7)
- # tools-deps (6)
- # xtdb (4)
Hi! Can I make pedestal use a redefined handler without any reload?
With ring and jetty, I used to refer to the handler with #'handler
and then it dynamically uses the latest version. Can I achieve something similar with (http/start (http/create-server …}}
?
Perhaps it's this line? https://github.com/pedestal/pedestal/blob/97ff368b64325b24d78a200205282cdc93e0d7a6/service-template/src/leiningen/new/pedestal_service/server.clj#L21
@maxt What do you mean by "without any reload"? If you're using the service template then, when developing locally and using run-dev
you can change your handler implementation and evaluate it in the repl to see the change take effect.
the pedestal service-tools
library provides a couple of helper fns which watch for changes and load them for you as well
I was following the http://pedestal.io/guides/hello-world tutorial and didn’t use run-dev
@maxt yes, for handlers that go at the end of an interceptor chain, but not for interceptors themselves (I think). If you have some current code that's not behaving as expected please share.
@maxt What do you mean by "without any reload"? If you're using the service template then, when developing locally and using run-dev
you can change your handler implementation and evaluate it in the repl to see the change take effect.