 (defn create-api [parser app-state]
   ["/"                   
    [
+    ["hello" (yada "hello")]
     ["garments" (yada (get-garments URI))]
+    
+    ;; You can't do this - yada doesn't know how to turn a promise
+    ;; into a resource (it can't infer much from a promise!)
+    ["garments-async-will-not-work" (yada (get-garments-async URI))]
+    
+    ["garments-async" (yada
+                       (resource
+                        {:methods
+                         {:get {:produces "text/html" :response (get-garments-async URI)}}}))]    
+
     ["api" (yada (om-resource parser app-state))]
     ["" (redirect "index.html")]
     ["favicon.ico" (yada nil)]
     ["" (yada (io/file "target/dev"))]
+    [true (yada nil)] ; 404 everything else
     ]])
 
 (s/defrecord Webserver [port :- (s/pred integer? "must be a port number!!")

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

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