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)
(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

Loading…
Cancel
Save