Hi all!
I am following the https://pedestal.io/pedestal/0.8/guides/hello-world.html on pedestal website, and I have a question about the REPL integration.
I made a change to the greet-handler to return a different string body and evaluated it on the REPL and was expecting a different return for /greet , but it didn't work.
Am I missing something? Is possible to do that without need to restart the REPL or server every time?
Ohhh thanks for the information! I will take a look
I'm letting Claude help with some documentation changes and some times it freaks me out: > Now I have a complete understanding. Let me plan and execute the rewrite.Now let me write the rewritten guide. The key structural change is that the old guide walked through three stages of failed reloading (captured function → backtick symbol → deferred route function → routes-from). With the connector API, conn/with-routes already uses routes-from internally, so the narrative needs to change. The guide should still explain why capture is a problem (it's educational), but then show that with-routes handles it automatically.
This is a genuine F.A.Q. about Ring. If you said something like
(def routes
#{["/greet" :get greet-handler
then greet-handler was frozen at that point. You might either re-eval routes, or try using #'greet-handlerin routes to compel a fresh resolution upon every requestDoing reloading properly consumes some resources, so it's partially behind a development mode. See https://pedestal.io/pedestal/0.8/guides/live-repl.html
We should rewrite the getting started to use the io.pedestal.connector APIs instead of the older io.pedestal.http APIs, in which case, you get the smarter reloading automatically, when development mode is on.. I already did this, but forgot about it.
Also, a. guide to using pedestal with clj-reload would be great.