             [compojure.route :as route]
             [compojure.core :refer [GET POST defroutes]]
             [ring.util.response :as resp]
-            [ring.middleware.params :as params]
+            (ring.middleware [params :refer [wrap-params]]
+                             [nested-params :refer [wrap-nested-params]]
+                             [keyword-params :refer [wrap-keyword-params]]
+                             [session :refer [wrap-session]]
+                             [resource :refer [wrap-resource]]
+                             [content-type :refer [wrap-content-type]])
             [aleph.http :refer :all]
             [aleph.formats :refer :all]
             [lamina.core :refer :all]

    (korma/transform
      (fn [m] (:message m))))

  (start-http-server (wrap-ring-handler (params/wrap-params app-routes))
                     {:port 3000 :websocket true}))

    (siphon chat ch)
    (siphon ch chat)))

(defn serve-page [page]
  (-> (resp/resource-response (str page ".html") {:root "public"})
      (resp/content-type "text/html")))

(defroutes app-routes
  (GET "/api/apps" [] apps-handler)
  (GET "/api/channels" [] channels-handler)
  (POST "/api/channels" [] new-channel-handler)
