This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-06-14
Channels
- # aws (6)
- # babashka (31)
- # beginners (69)
- # biff (9)
- # boot (9)
- # bristol-clojurians (1)
- # calva (20)
- # chlorine-clover (2)
- # cider (8)
- # cljsrn (24)
- # clojure (25)
- # clojure-norway (4)
- # clojure-spec (29)
- # clojure-uk (7)
- # conjure (23)
- # datahike (5)
- # datomic (39)
- # emacs (4)
- # fulcro (4)
- # graalvm (11)
- # honeysql (1)
- # lambdaisland (1)
- # leiningen (8)
- # liberator (1)
- # libpython-clj (3)
- # malli (6)
- # mxnet (1)
- # off-topic (94)
- # pedestal (13)
- # re-frame (4)
- # releases (2)
- # shadow-cljs (8)
- # spacemacs (22)
- # sql (9)
- # vim (1)
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
But other variations didn't work either.I just checked and it's in the right place.
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
@philipp.siegmantel Check this pedestal sample out https://github.com/pedestal/pedestal/tree/master/samples/ring-middleware
@joe.lane 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.