Hey all, I'm going through the guide here http://pedestal.io/guides/hello-world-query-parameters I actually just copied and pasted their entire code at the end, but I'm still having issues where it doesn't reload changes to the code. What I do:
clj
user=> (require 'hello)
user=> (hello/start-dev)
... some server stuff...
New terminal
curl -i <http://localhost:8890/greet?name=>"Aaron"
; Hello, Aaron
back in hello.clj, change the response to (str "Your name is: " nm ...)
user=> (hello/restart)
curl -i <http://localhost:8890/greet?name=>"Aaron"
; Hello, Aaron
At this point I was expecting it to start saying "Your name is: Aaron".
And if I shut down the repl, then start up all over again, it does! But it should do that just from running the (restart) function, no?I'd recommend to get started via the official pedestal-service
template.
Specifically, it uses this trick (`#'` syntax): https://github.com/pedestal/pedestal/blob/d20065013abf5d3793ae5301e18a2398707fa2a9/service-template/src/leiningen/new/pedestal_service/server.clj#L21