Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

using route/files vs route/resources in ring / compojure

What is the difference in using -

(route/files "/" {:root "yeoman/app"})

(route/resources "/" {:root "yeoman/app"})

for setting the root of the static folder ?

Thanks, Murtaza

like image 713
murtaza52 Avatar asked Feb 17 '23 20:02

murtaza52


1 Answers

resources, like clojure.java.io/resource, will work relative to your classpath and can get your data even if its in a jar/war instead of on the local file system.

like image 160
Joost Diepenmaat Avatar answered Mar 02 '23 18:03

Joost Diepenmaat