Fork me on GitHub
#ring
<
2024-03-20
>
itaied16:03:30

How can I serve a static folder of images? It's in the same level as src , running the server outside the repl

["/api"
 ["/images" (ring/create-file-handler {:root "images"})]]
but trying to get /api/images/file-name I get 404

weavejester17:03:56

It looks like you're using Reitit? If so, that needs to be "/images/*". See: https://cljdoc.org/d/metosin/reitit/0.7.0-alpha7/doc/ring/static-resources#internal-routes

🙌 1
✅ 1