If you're using Compojure, you can use compjure.route/files for that (as
opposed to compojure.route/resources which looks inside the jar). As Moritz
said, you still have to be a bit wary about the file path, as it will be
relative to the current directory of the JVM, not relative to the JAR file
location.

On Tuesday, 10 February 2015, Moritz Ulrich <mor...@tarn-vedra.de> wrote:

>
> See https://github.com/ring-clojure/ring/wiki/Static-Resources
>
> You should be able to pass '.' signifying the directory your application
> was started in (that might NOT be the same place as the jar).
>
> viper110110 <viper110...@gmail.com <javascript:;>> writes:
>
> > I would like to be able to serve up files from a folder after the jar has
> > been built. Ideally I could take a parameter in to the jar with the
> target
> > directory, but I could also settle for putting the jar in the directory
> > with the files or hardcoding a target directory near the jar. This is so
> > that I can change the files without having to rebuild the application.
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Clojure" group.
> > To post to this group, send email to clojure@googlegroups.com
> <javascript:;>
> > Note that posts from new members are moderated - please be patient with
> your first post.
> > To unsubscribe from this group, send email to
> > clojure+unsubscr...@googlegroups.com <javascript:;>
> > For more options, visit this group at
> > http://groups.google.com/group/clojure?hl=en
> > ---
> > You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to clojure+unsubscr...@googlegroups.com <javascript:;>.
> > For more options, visit https://groups.google.com/d/optout.
>
> --
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> <javascript:;>
> Note that posts from new members are moderated - please be patient with
> your first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com <javascript:;>
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com <javascript:;>.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to