summaryrefslogtreecommitdiffstats
path: root/prod
diff options
context:
space:
mode:
authorAdrian Batos-Parac <adrian.batos-parac@amdocs.com>2018-02-22 14:43:42 -0500
committerAdrian Batos-Parac <adrian.batos-parac@amdocs.com>2018-02-22 14:46:57 -0500
commite023325d3e76a71ac795ebbdb74f5a89756040a7 (patch)
tree63b2816a829c785f3c0329c3ea57ebd3c4f2937d /prod
parent2610df2fc29a9d16bb869f652d4d21caeae4c154 (diff)
Initial Commit of Chameleon
Commit the initial set of code for the Chameleon offering to ONAP Change-Id: Ia58bd49eafc0a3702c17c9cab34d666ed1627ba5 Issue-ID: AAI-797 Signed-off-by: Adrian Batos-Parac <adrian.batos-parac@amdocs.com>
Diffstat (limited to 'prod')
-rw-r--r--prod/chameleon/server.clj18
1 files changed, 18 insertions, 0 deletions
diff --git a/prod/chameleon/server.clj b/prod/chameleon/server.clj
new file mode 100644
index 0000000..b9b38db
--- /dev/null
+++ b/prod/chameleon/server.clj
@@ -0,0 +1,18 @@
+(ns chameleon.server
+ (:require [chameleon.config :refer [config]]
+ [chameleon.handler :refer [handler]]
+ [config.core :refer [env]]
+ [org.httpkit.server :refer [run-server]]
+ [integrant.core :as ig])
+ (:gen-class))
+
+(defn -main [& args]
+ (let [port (Integer/parseInt (or (env :http-port) "8082"))
+ system-config (read-string (slurp (System/getenv "CONFIG_LOCATION" )))
+ event-config (:event-config system-config)
+ route-config (:gallifrey-host system-config)]
+ (println "Listening on port" port)
+ (ig/init (config {
+ :event-config event-config
+ :gallifrey-host route-config
+ :http-port port}))))