gpt4 book ai didi

web-applications - 如何告诉 Hunchentoot 在哪里可以找到要提供的静态网页?

转载 作者:太空宇宙 更新时间:2023-11-03 18:34:04 26 4
gpt4 key购买 nike

Hunchentoot 文档指出:

"The method for ACCEPTOR tries to serve a static file relative to it's ACCEPTOR-DOCUMENT-ROOT."

acceptor-document-root acceptor => (or pathname null)

(setf (acceptor-document-root acceptor ) new-value)

http://weitz.de/hunchentoot/

我在将这份文档翻译成实际的 Lisp 代码时遇到了问题。

谁能给我一个例子,说明如何告诉 Hunchentoot 去哪里寻找要提供的静态网页?

最佳答案

最简单的代码翻译是这样的:

(hunchentoot:start (make-instance 'hunchentoot:acceptor :port 4242
:document-root #p"<path to static files dir>"))

关于web-applications - 如何告诉 Hunchentoot 在哪里可以找到要提供的静态网页?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8285115/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com