Fork me on GitHub
#pedestal
<
2022-01-11
>
maxt12:01:39

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 …}}?

ddeaguiar15:01:22

@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.

ddeaguiar15:01:14

the pedestal service-tools library provides a couple of helper fns which watch for changes and load them for you as well

maxt15:01:35

Supplying ::http/routes as a function worked perfectly.

maxt15:01:29

I was following the http://pedestal.io/guides/hello-world tutorial and didn’t use run-dev

maxt15:01:59

But thank you all for all your pointers

👍 1
orestis15:01:57

@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.

ddeaguiar15:01:22

@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.