mount

onetom 2016-08-20T12:50:24.000772Z

do i understand well if i use yurt, im kind of back to where i was with stuart-sierra-system before, because my application functions should receive a yurt as a parameter, just like in the stuart-sierra-system case?

tolitius 2016-08-20T17:29:21.000776Z

@onetom: no. you would use it exactly like you would mount with an exception of the macros, since they expand at compile time. not to be too cryptic here: compojure's defroutes is a macro, so if you want it to access yurt states (which are really just mount states) within this macro, you would need to pass that state on defroutes creation

tolitius 2016-08-20T17:29:32.000777Z

everything else in terms of usage is the same

tolitius 2016-08-20T17:29:51.000778Z

here is an example app using yurt: https://github.com/tolitius/yurt/tree/master/dev/clj/neo

tolitius 2016-08-20T17:33:46.000780Z

you can play with in in repl:

$ git clone <https://github.com/tolitius/yurt>
$ cd yurt
$ boot repl
boot.user=&gt; (dev)
dev=&gt; (def bp (yurt/blueprint))
#'dev/bp
dev=&gt; (def dev-yurt (yurt/build bp))
INFO  utils.logging - &gt;&gt; starting..  #'neo.conf/config
INFO  neo.conf - loading config from dev/resources/config.edn
INFO  utils.logging - &gt;&gt; starting..  #'neo.db/db
INFO  neo.db - conf:  {:datomic {:uri datomic:<mem://yurt>}, :www {:port 4242}, :nrepl {:host 0.0.0.0, :port 7878}}
INFO  neo.db - creating a connection to datomic: datomic:<mem://yurt>
INFO  utils.logging - &gt;&gt; starting..  #'neo.www/neo-app
INFO  neo.stager - staging the order book with 6 orders...
INFO  utils.logging - &gt;&gt; starting..  #'neo.app/nrepl
#'dev/dev-yurt