dea*_*ost 6 lisp common-lisp hunchentoot
如何在项目中启动 Hunchentoot?我查看了 Edi Weitz 的指南,一切都很顺利,直到安装完成。列出的教程要么不完整,要么略过实际服务器使用情况。
我有我的 asdf 文件,使用 quicklisp 安装了依赖项,并设置了一个调度表。我如何让 Hunchentoot 使用这些东西?
您start在 的实例上调用acceptor。
easy-handler如果您使用hunchentoot 附带的基本机制,那将是一个easy-acceptor.
您将需要有一种机制来启动和停止服务器。这可能看起来像这样:
(defvar *acceptor* nil)
(defun start-server ()
(stop-server)
(start (setf *acceptor*
(make-instance 'easy-acceptor
:port 4242))))
(defun stop-server ()
(when *acceptor*
(stop *acceptor*)))
Run Code Online (Sandbox Code Playgroud)