使用 Compojure,我可以像这样提供静态资源:
(defroutes routes
(route/resources "/"))
按照雅达文档我有这个工作:
(def server
(listener
["/"
[["hello" (as-resource "Hello World!")]
["test" (resource {:produces "text/plain"
:response "This is a test!"})]
[true (as-resource nil)]]]
{:port 3000}))
但是如何让雅达从文件系统中提供资源呢?