(ns helloworld.core (:use ring.adapter.jetty) (:import com.cyberark.conjur.api.Conjur) (:gen-class)) (defn handler [request] {:status 200 :headers {"Content-Type" "text/html"} :body (str "Hello " (if-let [target (System/getenv "TARGET")] target "World") "!\n")}) (defn -main [& args] (def conjur (com.cyberark.conjur.api.Conjur.)) (def secret (.variables.retrieveSecret conjur (System/getenv "SECRET_PATH"))) (run-jetty handler {:port (if-let [port (System/getenv "PORT")] (Integer/parseInt port) 8080)}))