如何告诉 Hunchentoot 在哪里可以找到要提供的静态网页? [英] How to tell Hunchentoot where to find static web pages to serve?

查看:28
本文介绍了如何告诉 Hunchentoot 在哪里可以找到要提供的静态网页?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hunchentoot 文档指出:

The Hunchentoot documentation states:

ACCEPTOR 的方法尝试提供相对于它的 ACCEPTOR-DOCUMENT-ROOT 的静态文件."

acceptor-document-root acceptor =>(或路径名为空)

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

http://weitz.de/hunchentoot/

我无法将这份文档翻译成实际的 Lisp 代码.

I am having trouble in translating this documentation into actual Lisp code.

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

Can someone please give me an example of how to tell Hunchentoot where to look for static web pages to serve?

推荐答案

最简单的代码转换如下:

The simplest translation to code will be this:

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

这篇关于如何告诉 Hunchentoot 在哪里可以找到要提供的静态网页?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆