I don't know why the lein new heroku _
template doesn't do this for you.
Use compojure.route/resources to tell the handler where to look for static files.
(defroutes app
(ANY "/repl" ...)
(GET "/" [] ...)
(route/resources "/")
(ANY "*" [] ...))
Now, if you visit http://example.com/style.css
, it will expect resources/public/style.css
.
Aside: It's better to serve static assets from resources/public/
rather than resources/
because you may want to have resources/secrets.txt
without anybody being able to access it.