Fork me on GitHub
#yada
<
2017-02-10
>
wotbrew11:02:59

Quick question, how do I serve static resources from a directory on the classpath? I want a route something like this: ["docs" (yada/as-resource (io/resource "docs/")))]

malcolmsparks11:02:51

there's a new-classpath-resource function for this.

wotbrew11:02:46

got it - thanks

malcolmsparks11:02:38

Watch out, it only works when the path is non-empty

wotbrew11:02:51

thats ok for me at the moment

dominicm16:02:16

@danstone is riverford using yada?!

wotbrew16:02:52

Trialing it for an internal API, not in prod yet

wotbrew16:02:04

Its the first time I've used it

malcolmsparks17:02:42

Riverford? My wife and I are loyal customers. We buy a LOT from them. :)

fabrao22:02:13

Hello all, I want to see swagger working in minimal way, so, I´ve tried

(def api
["/hello­api"
(yada/swaggered
{:info {:title "Hello World!" :version "1.0"
:description "Demonstrating yada + swagger"}}
["/" {"hello" (yada "Hello World!")
"hello­atom" (yada (atom "Hello World!"))}])])
from manual

fabrao22:02:37

how to use it in listener?