Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 088d90e17c
Fetching contributors…

Cannot retrieve contributors at this time

55 lines (48 sloc) 2.299 kb
(in-package #:cliki2)
;;; unreferenced uri checking
(dolist (unreferenced-uri (set-difference %referenced-uris %defined-uris
:key #'car :test #'string-equal))
(warn "Reference warning: referencing unknown URI resource ~a in file ~a"
(car unreferenced-uri) (cdr unreferenced-uri)))
(defvar *cliki-server* nil)
(defun start-cliki-server (port homedir wikis)
(if *cliki-server*
(progn (warn "CLiki server already running")
;; SBCL, CCL and possibly others always start w/same pseudo-random seed
(setf *random-state* (make-random-state t))
;; set up HyperSpec paths
(setf clhs-lookup::*hyperspec-pathname*
(merge-pathnames "HyperSpec/" homedir)
(merge-pathnames "HyperSpec/Data/Symbol-Table.text" homedir)
clhs-lookup::*hyperspec-root* "/site/HyperSpec/")
(lambda ()
(loop (map nil (lambda (x)
(expire-old-sessions (cadr x)))
(sleep (* 60 60 24)))))
(let ((error-log (merge-pathnames "error-log" homedir))
(access-log (merge-pathnames "access-log" homedir)))
(open error-log :direction :probe :if-does-not-exist :create)
(open access-log :direction :probe :if-does-not-exist :create)
(let ((acceptor
:port port
:access-log-destination access-log
:message-log-destination error-log
:wikis wikis
"/site/HyperSpec/" (merge-pathnames #p"HyperSpec/" homedir))
"/site/error-log" error-log "text/plain")
(start acceptor)
(setf *cliki-server* acceptor))))))
Jump to Line
Something went wrong with that request. Please try again.