Browse Source

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.
stable
Craig Oates 2 years ago
parent
commit
b99e4b95f9
  1. 31
      src/main.lisp

31
src/main.lisp

@ -1,14 +1,14 @@
(in-package :cl-user) (in-package #:cl-user)
(defpackage ritherdon-archive (defpackage #:ritherdon-archive
(:use :cl) (:use #:cl)
(:import-from :ritherdon-archive.config (:import-from #:ritherdon-archive.config
:config) #:config)
(:import-from :clack (:import-from #:clack
:clackup) #:clackup)
(:export :start (:export #:start
:stop #:stop
:main)) #:main))
(in-package :ritherdon-archive) (in-package #:ritherdon-archive)
(defvar *appfile-path* (defvar *appfile-path*
(asdf:system-relative-pathname :ritherdon-archive #P"app.lisp")) (asdf:system-relative-pathname :ritherdon-archive #P"app.lisp"))
@ -34,11 +34,10 @@
================================================================================ ================================================================================
https://lisp-journey.gitlab.io/web-dev/#building https://lisp-journey.gitlab.io/web-dev/#building
The code below was taken from the URL above (with slight modifications). It's 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 main use is to make it easier to start the server via a script.
most likely the start-hunchentoot-production.sh script in-particular).
|# |#
(defun main (port) (defun main (&key (port 5000))
(start :server :hunchentoot (start :server :woo ; hunchentoot or woo.
:port port :port port
:debug (if (ritherdon-archive.config:productionp) :debug (if (ritherdon-archive.config:productionp)
nil nil
@ -46,7 +45,7 @@ most likely the start-hunchentoot-production.sh script in-particular).
;; with bordeaux-threads ;; with bordeaux-threads
(handler-case (bt:join-thread (handler-case (bt:join-thread
(find-if (lambda (th) (find-if (lambda (th)
(search "hunchentoot" (bt:thread-name th))) (search "woo" (bt:thread-name th)))
(bt:all-threads))) (bt:all-threads)))
(#+sbcl sb-sys:interactive-interrupt (#+sbcl sb-sys:interactive-interrupt
#+ccl ccl:interrupt-signal-condition #+ccl ccl:interrupt-signal-condition

Loading…
Cancel
Save