You'll need to use ring.util.response/resource-response
which serves files found on the classpath. Assuming you want to serve an index.html
file found inside a resources
directory in your überjar, the arguments would be almost exactly as in your call to file-response
:
(response/resource-response "index.html" {:root "public"})
It's "public"
as opposed to "resources/public"
, because resources
is one of the top-level directories included in the überjar, so public
will be found on the classpath on the top level. (This would also be true if running from the filesystem instead of an überjar; the path then needs to be relative to some top-level directory on the classpath.)