我正在学习 common lisp 并尝试使用 hunchentoot 开发网络应用程序。
使用下面的代码,我无法在浏览器上查看复古游戏功能定义中定义的页面。我希望它是由这个函数生成的。
我写地址为:
http://localhost:8080/retro-games.htm.
浏览器上显示的是Resource /retro-games.htm not found
我可以显示的默认页面上的消息和 lisp 徽标。我可以显示hunchentoot的默认页面。
(ql:quickload "hunchentoot")
(ql:quickload "cl-who")
(defpackage :retro-games
(:use :cl :cl-who :hunchentoot))
(in-package :retro-games);i evaluate this from toplevel otherwise it does not change to this package.
(start (make-instance 'hunchentoot:acceptor :port 8080))
(defun retro-games ()
(with-html-output (*standard-output* nil :prologue t)
(:html (:body "Not much there"))
(values)))
(push (create-prefix-dispatcher "/retro-games.htm" 'retro-games) *dispatch-table*)
一开始的两次加载都是成功的。
我错过了什么?