ring

itaied 2024-03-20T16:32:30.213429Z

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

weavejester 2024-03-20T17:45:56.267709Z

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