This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-04-14
Channels
- # admin-announcements (5)
- # aws (3)
- # beginners (35)
- # boot (96)
- # cider (1)
- # clara (6)
- # cljs-dev (12)
- # cljsrn (34)
- # clojure (151)
- # clojure-boston (3)
- # clojure-brasil (4)
- # clojure-canada (1)
- # clojure-czech (8)
- # clojure-dusseldorf (11)
- # clojure-japan (5)
- # clojure-russia (120)
- # clojure-taiwan (1)
- # clojure-uk (3)
- # clojurescript (7)
- # component (27)
- # cursive (13)
- # data-science (45)
- # datomic (1)
- # devcards (5)
- # emacs (3)
- # funcool (65)
- # hoplon (103)
- # instaparse (3)
- # jobs (14)
- # jobs-discuss (1)
- # juxt (2)
- # lein-figwheel (2)
- # off-topic (16)
- # om (20)
- # onyx (49)
- # parinfer (17)
- # perun (1)
- # planck (5)
- # proton (4)
- # re-frame (14)
- # ring-swagger (4)
- # spacemacs (4)
- # untangled (110)
- # yada (14)
@niwinz: Is there something similar to a war file that you can create in order to nicely bundle up your application? It would be nice to able to serve static files from inside a jar instead of requiring it be on the system path
serving the static from the jar is completly independent from the ability to create war
but as far as I know it is easy setup puting the .catacumba file inside resources and configure properly the routing for serve static files from there
Right but the problem is that :base-dir requires a system path, not relative path inside a jar
indicates to catacumba that if no base dir is specified, find one that contains that file
I don't know the impl, the fact is, if you don't provide the base-dir parameter on server startup, it will find .catacumba
file in the class path and the directory where that file exists put as the base dir
in ratpack you should explicitly set always the base-dir, and you can use some helper for do that catacumba does
Found the relavent fn: https://github.com/funcool/catacumba/blob/bbb0d0955a07960ffa0ec67c085447673cd2ddd4/src/clojure/catacumba/impl/server.clj#L77
Yes in prod. This is actually for a small dev tool so it would be nice to just distribute it as a standalone jar that can run in the background.
[3/5.2]niwi@kaleidos:~/uxbox/uxbox-backend> java -jar target/uxbox-backend-0.1.0-SNAPSHOT-standalone.jar -m uxbox.main Exception in thread "main" java.lang.IllegalStateException: Could not find marker file '.catacumba' via context class loader
The most closes solution to that you want is just create the uberjar and latter package it for use static files from main filesystem (no classpath), you don't need nginx but at this moment you can't serve files from classpath
java -Dcatacumba.basedir=`pwd`/resources -jar target/uxbox-backend-0.1.0-SNAPSHOT-standalone.jar -m uxbox.main
I will try to implement the ability to serve static files from classpath, because for small applications this is the most obvious way to deploy them 😄
@kenny: I think that I found a solution, at this moment I don't have much time for it, but this afternoon I'll try to make it done
https://github.com/funcool/catacumba/blob/master/doc/content.adoc#configuration-options