This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-11-09
Channels
- # alda (9)
- # announcements (1)
- # beginners (6)
- # boot (140)
- # cbus (2)
- # cider (27)
- # cljs-dev (19)
- # cljsrn (17)
- # clojure (104)
- # clojure-art (1)
- # clojure-brasil (5)
- # clojure-colombia (2)
- # clojure-russia (146)
- # clojure-sg (3)
- # clojurescript (64)
- # clojurex (1)
- # cursive (17)
- # data-science (22)
- # datomic (41)
- # editors-rus (5)
- # events (1)
- # hoplon (61)
- # ldnclj (35)
- # lein-figwheel (1)
- # off-topic (1)
- # om (119)
- # onyx (214)
- # re-frame (3)
- # reagent (13)
- # robots (5)
- # slack-help (1)
- # yada (17)
Hi yada guys, good te see movement over here too
Welcome @tangrammer
Hi Thomas!
Is there a recommended way to serve files from the classpath? calling (yada (-> "public/" io/resource io/file))
got me a very neat error message that this is not supported yet
I tried using (->ResourcesMaybe)
from bidi but that fails as soon as I create a uberjar it seems to not call io/file
on the assets
Hi @mitchelkuijpers , in yada/dev/yada/dev/console.clj
there is some examples to serve html or js (-> "cljsjs/react/production/react.min.inc.js" io/resource yada)
Aha I will look there thnx @tangrammer
👍 BTW: file_resource.clj seems to be implemented too src/yada.resources.file_resource.clj
fixed by using ["/public/" (bidi/resources {:prefix "public/"})]
I think I was doing something wrong earlier
A single resource works perfectly with yada but folders are not implemented yet ^^
@mitchelkuijpers @tangrammer yes, use bidi's bidi/resources for now - but directory serving does work on master, see dev/src/yada/dev/talks.clj for example - I use it for my talks
The plan is to deprecate bidi's inferior resource/file directory serving and replace with yada's - because yada's will also support conditional requests, content negotiation and lots of other http features out-of-the-box
bidi's are really just a placeholder because bidi isn't really designed for this - it's primarily a URI router
Aha I see, this is perfectly fine for now. Really liking Yada I tried the 0.4.3 version a whole while back but I am reconsidering Yada, really liking the approach with protocols
seems very extensible
there you go @malcolmsparks another +1 for the protocols 😄
@stijn: I'm a protocol fan too , but I have more problems with defrecords (as common way to impl protocols) due that for me they are more closed that they should ...