Hello, I'm new to pedestal and am trying to figure out how to serve static resources. My routes look like this
(def routes #{["/static/" :get [(fast-resource "/static")]]})
but trying to curl a file results in a 404.The curl command looks like this:
curl <http://localhost:8080/static/header.png>
But other variations didn't work either.@philipp.siegmantel Check this pedestal sample out https://github.com/pedestal/pedestal/tree/master/samples/ring-middleware
It serves a static http form.
Did you put your resources under resources/static/
?
@lanejo01 Thank you, but I don't think that the example covers what I am trying to do. I didn't specify it in detail, so let's just do it know. I simply want to serve xml, audio and video files. fast-resource
seems to be exactly what I want, but I can't seem to get it to work.
I just checked and it's in the right place.
::http/resource-path "/public"
This is worth trying.
This will not use fast-resource but will use resource middleware. The former uses Java NIO.
thanks, I'll try that
It works, thanks for your help