You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Restas
Hi,
I've played a bit with Hunchentoot and I'm now trying Restas and I would
like to know what was the cleanest way to handle static files like
JavaScript files or images.
I've tried to define my own acceptor and to set the slot DOCUMENT-ROOT
but hunchentoot:handle-static-file, the method used when a route returns
a pathname, doesn't seem to use it.
So I've made a custom route like this
(define-route script-js ("*/:(name).js")
;; Route used to find JavaScript files
(declare (ignorable ||))
(make-pathname :name name
:type "js"
:directory '(:relative "script")))
Though I would like to put the directories script/ and images/ in a www/
without having to specify it in the route '(:relative "images") and not
'(:relative "www" "images").