From 47a0ab538e3286bd3adbda682b429b52c25bc137 Mon Sep 17 00:00:00 2001 From: Practicalli Engineering Date: Thu, 5 Sep 2024 14:36:44 +0100 Subject: [PATCH] repl: reader quote when passing handler to the server - donut --- docs/service-repl-workflow/donut-system.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/service-repl-workflow/donut-system.md b/docs/service-repl-workflow/donut-system.md index e1b1d5f4..85817638 100644 --- a/docs/service-repl-workflow/donut-system.md +++ b/docs/service-repl-workflow/donut-system.md @@ -110,7 +110,7 @@ The event log publisher and http service have no intrinsic relationship, so orde :http {:server #::donut{:start (fn http-kit-run-server [{{:keys [handler options]} ::donut/config}] - (http-server/run-server handler options)) + (http-server/run-server #'handler options)) :stop (fn http-kit-stop-server [{::donut/keys [instance]}] (instance)) @@ -120,6 +120,9 @@ The event log publisher and http service have no intrinsic relationship, so orde :handler (router/app (donut/ref [:env :persistence]))}}}) ``` +!!! HINT "Quote handler function to evaluate changes" + Use `#'` reader quote when passing the `handler` function to the server so that changes to the code called by the handler function can be updated by evaluating those changes in the REPL. + ## Start the system