I've had the same question. What I've come up with is to introduce a new
middleware in the the dev-system, which wraps the both the creation of the
app handler and calling the handler with the request map. The prod-system
would still refer directly to a single instance of the app handler.
Now i
In main.clj, it looks like you aren't keeping a reference to the started
app. So when you call stop, you are actually stopping the version of the
system which doesn't have the jetty server set.
Try changing this:
(defn -main [& args]
(component/start app)
(component/stop app))
to this:
(de
Is there anything for map which operates like update-in and assoc-in, where
we can call a function with the value looked up in a nested structure?
What I've come up with:
(defn map-in
"Returns a lazy sequence consisting of the results of
calling map on coll, for each value in the coll,
extr
Try:
:repositories [["..." "url"]]
-Steve
--
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 unsu
I'm trying to figure out if there is a better / more concise / more generic
way to write an update function. The data I have is a vector of maps
containing vectors of maps.
For example:
[{:values [{:y 1 :x 4}{:y 2 :x 7}]}{:values [{:y 5 :x 8}]}]
The goal is to update all the :y values or all
Schematic is a Clojure library which aids in assembling Component systems
from configuration data.
* Expects components to implement the Component/Lifecycle protocol
* Prefers pure data for declaring dependencies
* Provides a simple mechanism for assembling/starting just a subset of
Components
This sounds like a good candidate for using Component
(https://github.com/stuartsierra/component). I would think you could create
a component which starts the async process. That component could then be
provided to your ring handlers, to be used during web request processing.
On Monday, Febru