From b1f7b54fece789a2abcda356c7c2bca23a7100f1 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Sun, 29 Jan 2023 21:44:54 +0000 Subject: web: Explain why we pass a project thunk to the dev server. * tissue/web/dev.scm (handler): Explain why we pass in a project thunk. --- tissue/web/dev.scm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tissue') diff --git a/tissue/web/dev.scm b/tissue/web/dev.scm index 0140e0f..5ca7d16 100644 --- a/tissue/web/dev.scm +++ b/tissue/web/dev.scm @@ -36,6 +36,10 @@ "Handle web @var{request} with @var{body} and return two values---the response headers and body. See @code{start-dev-web-server} for documentation of @var{xapian-index} and @var{project-thunk}." + ;; The project configuration could have changed between requests and + ;; we want to read the latest configuration on each request. So, we + ;; require a thunk that loads the project configuration, rather than + ;; the project configuration itself. (let ((project (project-thunk)) (path (uri-path (request-uri request)))) (log-request request) -- cgit v1.2.3