             [compojure.route :refer [resources]]
             [compojure.handler :refer [api]]
             [compojure.core :refer [GET POST routes defroutes context]]
-            [ring.middleware.defaults :refer [wrap-defaults site-defaults]]
+            [ring.middleware.defaults :refer [wrap-defaults secure-site-defaults site-defaults]]
             [ring.middleware.edn :refer [wrap-edn-params]]
+            [taoensso.carmine.ring :as carmine]
             [chat.server.sync :refer [sync-routes]]
+            [environ.core :refer [env]]
             [chat.server.db :as db]))
 
 (defn edn-response [clj-body]

        resource-routes
        site-routes
        sync-routes)
      (-> site-defaults ; TODO: switch to secure-site-defaults when in using https in prod
          (assoc-in [:security :anti-forgery]
            {:read-token (fn [req] (-> req :params :csrf-token))})))
      wrap-edn-params))

(defroutes resource-routes
  (resources "/"))

(def ^:dynamic *redis-conf* {:pool {}
                             :spec {:host "127.0.0.1"
                                    :port 6379}})

(def app
  (->
    (wrap-defaults
