   (GET "/api/chat/messages/:thread-id" [] chat-messages-handler)
   (GET ["/api/chat/ws/:thread-id", :thread-id #"[0-9A-Za-z]+"] {}
        (wrap-aleph-handler chat-thread-ws-handler))
-  (GET "/*" {:keys [uri]} (resp/resource-response "index.html" {:root "public"}))
+  (GET "/*" [] (serve-page "index"))
   (route/not-found "Page not found"))
 
 (defn -main [& args]

(defn channels-handler [request]
  (edn-response
    (let [params (:params request)
          lon (read-string (get params "lon"))
          lat (read-string (get params "lat"))]
      (get-channels lon lat))))

(defn new-channel [channel-name lon lat]

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

  (start-http-server
    (wrap-ring-handler
      (-> app-routes
          (wrap-session)
          (wrap-keyword-params)
          (wrap-nested-params)
          (wrap-params)
          (wrap-resource "public")
          (wrap-content-type)))
    {:port 3000 :websocket true}))
