diff options
author | Vincent Ambo <tazjin@google.com> | 2020-01-22T11·56+0000 |
---|---|---|
committer | Vincent Ambo <tazjin@google.com> | 2020-01-22T11·56+0000 |
commit | 6fdc5b562d9a6e708dd179679faab429f13c563e (patch) | |
tree | 6406ece0b9b51ea26b55a2a3f7bf5b62592ce1b9 /fun | |
parent | a1d624057cf7e184aca3c19c83b3f2815c1883b8 (diff) |
refactor(fun/gemma): Make acceptor available in a variable r/445
This makes it possible to *stop* the server again in a REPL, which is useful :)
Diffstat (limited to 'fun')
-rw-r--r-- | fun/gemma/src/gemma.lisp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/fun/gemma/src/gemma.lisp b/fun/gemma/src/gemma.lisp index cf074cfb8701..20a76caae629 100644 --- a/fun/gemma/src/gemma.lisp +++ b/fun/gemma/src/gemma.lisp @@ -29,6 +29,9 @@ (defvar *gemma-port* 4242 "Port on which the Gemma web server listens.") +(defvar *gemma-acceptor* nil + "Hunchentoot acceptor for Gemma's web server.") + (defvar *static-file-location* "frontend/" "Folder from which to serve static assets. If built inside of Nix, the path is injected during the build.") @@ -134,10 +137,10 @@ maximum interval." "/etc/gemma/config.lisp"))) ;; Set up web server - (hunchentoot:start - (make-instance 'hunchentoot:easy-acceptor - :port *gemma-port* - :document-root *static-file-location*)) + (setq *gemma-acceptor* (make-instance 'hunchentoot:easy-acceptor + :port *gemma-port* + :document-root *static-file-location*)) + (hunchentoot:start *gemma-acceptor*) ;; Task listing handler (hunchentoot:define-easy-handler |