   (using
    (map->Webserver {:port 3000})
    []))
+.

                        api]
  Lifecycle
  (start [component]
    (let [app-state (atom
                     {:garments/by-id
                      (let [response (deref (http/get URI))]
                        (if (= (:status response) 200)
                          (into {}
                                (for [garment (json/decode (b/to-string (:body response)) keyword)]
                                  [(:id garment) garment]))
                          (throw (Exception. "Oh no!!!"))))})
          api (create-api (om/parser {:read readf :mutate mutatef}) app-state)]
      (assoc component
             :app-state app-state

   [clojure.java.io :as io]
   [clojure.tools.logging :refer :all]
   [com.stuartsierra.component :refer [Lifecycle using]]
   [manifold.deferred :as d]
   [schema.core :as s]
   [cheshire.core :as json]
   [byte-streams :as b]
