     (log/info (str "TEST USER DETAILS:" user))
     (log/info (str "TEST CLIENT DETAILS:" client-details))))
 
-(def lein-app (create-app true))
+(def lein-app (create-app :dev-mode? true))

            [stonecutter.translation :as t]
            [stonecutter.middleware :as m]))

(defn not-found [request]
  (let [context {:translator (t/translations-fn t/translation-map)}]
    (-> (html-response (error/not-found-error context))
        (r/status 404))))

(def site-handlers
  {:home                   user/home

      (wrap-defaults api-defaults)
      (m/wrap-error-handling dev-mode?)))                   ;; TODO create json error handler

(defn create-app [& {dev-mode? :dev-mode? }]
  (splitter (create-site-app dev-mode?) (create-api-app dev-mode?)))

(def app (create-app :dev-mode? false))

(def port (Integer. (get env :port "3000")))

