 (ns just-married.api
   (:gen-class)
   (:require [buddy.auth :refer [authenticated? throw-unauthorized]]
-            [buddy.auth.accessrules :refer [restrict]]
             [buddy.auth.backends.httpbasic :refer [http-basic-backend]]
             [buddy.auth.middleware :refer [wrap-authentication wrap-authorization]]
             [hiccup.core :as html]

(defroutes app-routes
  (GET "/" [] (render-page :initial :en))
  (GET "/enter" [] (render-page :initial :en))
  (GET "/main" request (render-page :home (detect-language request)))
  (GET "/guests" request (guest-list request)))

(def app


(def ^:private security (= (env :secure) "true"))
(def ^:private default-port 3000)
(def ^:private default-language :en)
(def ^:private available-languages #{:en :it})

(defn- get-port
  []
