 
 (def app
   (-> (handler/site app-routes)
+      (init-middleware)
       (friend/authenticate {:allow-anon? true
                             :login-uri "/login"
                             :default-landing-uri "/user/profile"

  [:body {:class "row"}
   (into [:div {:class "columns small-12"}] content)])

(defn init [env]
  (println "INIT ")
  (pprint (app-config))

  (comment  {:collection-name "workouts"
             :db-name "hit-wl-db"
             :uri (if (= env :prod) heroku-mongo-connection-uri nil)})
  (db/init (:db-config (app-config))) )

(defn get-userdata [username]
  {:username username


(def pretty-head
  [:head [:link {:href "/css/normalize.css" :rel "stylesheet" :type "text/css"}]
   [:link {:href "/css/foundation.min.css" :rel "stylesheet" :type "text/css"}]
         [:style {:type "text/css"} "ul { padding-left: 2em }"]
         [:script {:src "/js/foundation.min.js" :type "text/javascript"}]])

