Use file handler so assets work in jar

main
Eric Ihli 3 years ago
parent fd3b7dd445
commit 5221ed5f8f

@ -44,6 +44,8 @@
artists-by-album))}))) artists-by-album))})))
(def resource-handler (ring/create-resource-handler {:allow-symlinks? true})) (def resource-handler (ring/create-resource-handler {:allow-symlinks? true}))
(def file-handler (ring/create-file-handler {:allow-symlinks? true
:root "resources/public"}))
(defn limerick-generation-post-handler (defn limerick-generation-post-handler
[db cache] [db cache]

@ -32,7 +32,7 @@
:coercion reitit.coercion.spec/coercion :coercion reitit.coercion.spec/coercion
:parameters {:path {:artist-id int?}} :parameters {:path {:artist-id int?}}
:get {:handler (handlers/artist-get-handler db)}}]] :get {:handler (handlers/artist-get-handler db)}}]]
["/assets/*" handlers/resource-handler] ["/assets/*" handlers/file-handler]
["/wgu" ["/wgu"
{:name ::wgu {:name ::wgu
:get {:handler (handlers/wgu db cache)} :get {:handler (handlers/wgu db cache)}

Loading…
Cancel
Save