You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
831 B

(in-package :lolisp)
(defvar *serb* nil
"The hunchentoot acceptor (server) that will serve our handlers and
files.")
(defun configure ()
(configure-loligram)
(setf *serb* (make-instance 'toot:acceptor
:port (config-item :port)
:name 'lolisp
:message-log-destination *error-output*
:access-log-destination *standard-output*
:document-root (config-item :document-root))))
(defun start ()
(handler-case (configure)
(error (e) "Configuration failed: ~a" e))
(when (null *serb*)
(error "Serb is nill? ehh?"))
(hunchentoot:start *serb*))
(defun stop ()
(hunchentoot:stop *serb* :soft t))
(export '(configure
start
stop
*serb*))