🎉 Add initial exporter (nodejs) application.

This commit is contained in:
Andrey Antukh 2020-06-29 16:07:48 +02:00 committed by Hirunatan
parent d521416329
commit c2db6d4f35
10 changed files with 1048 additions and 0 deletions

View file

@ -0,0 +1,20 @@
(ns app.config
(:require
["process" :as process]
[cljs.pprint]
[cuerdas.core :as str]))
(defn- keywordize
[s]
(-> (str/kebab s)
(str/keyword)))
(defonce env
(let [env (unchecked-get process "env")]
(persistent!
(reduce #(assoc! %1 (keywordize %2) (unchecked-get env %2))
(transient {})
(js/Object.keys env)))))
(defonce config
{:domain (:app-domain env "localhost:3449")})