From b99e4b95f9e84099a96ffd0391d0854b90a9fa7d Mon Sep 17 00:00:00 2001 From: Craig Oates Date: Sat, 29 Oct 2022 20:22:49 +0100 Subject: [PATCH] intern stuff with '#:' in ritherdon-archive pack. and change to woo. The first part is just a minor change to get Emacs to indent the defpackage stuff in an orderly fashion. The second part refers to the 'main' function. I've changed the server it uses/specifies from Hunchentoot to Woo. I've been using Woo throughout development so I'm more confident with the system using that when it goes into production. The 'main' is used, instead of 'start' when running the website as a systemd service on the production server. --- src/main.lisp | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/src/main.lisp b/src/main.lisp index 7d72c5e..7998566 100644 --- a/src/main.lisp +++ b/src/main.lisp @@ -1,14 +1,14 @@ -(in-package :cl-user) -(defpackage ritherdon-archive - (:use :cl) - (:import-from :ritherdon-archive.config - :config) - (:import-from :clack - :clackup) - (:export :start - :stop - :main)) -(in-package :ritherdon-archive) +(in-package #:cl-user) +(defpackage #:ritherdon-archive + (:use #:cl) + (:import-from #:ritherdon-archive.config + #:config) + (:import-from #:clack + #:clackup) + (:export #:start + #:stop + #:main)) +(in-package #:ritherdon-archive) (defvar *appfile-path* (asdf:system-relative-pathname :ritherdon-archive #P"app.lisp")) @@ -34,11 +34,10 @@ ================================================================================ https://lisp-journey.gitlab.io/web-dev/#building The code below was taken from the URL above (with slight modifications). It's -main use is to make it easier to start the server via a script (see /scripts and -most likely the start-hunchentoot-production.sh script in-particular). +main use is to make it easier to start the server via a script. |# -(defun main (port) - (start :server :hunchentoot +(defun main (&key (port 5000)) + (start :server :woo ; hunchentoot or woo. :port port :debug (if (ritherdon-archive.config:productionp) nil @@ -46,7 +45,7 @@ most likely the start-hunchentoot-production.sh script in-particular). ;; with bordeaux-threads (handler-case (bt:join-thread (find-if (lambda (th) - (search "hunchentoot" (bt:thread-name th))) + (search "woo" (bt:thread-name th))) (bt:all-threads))) (#+sbcl sb-sys:interactive-interrupt #+ccl ccl:interrupt-signal-condition