0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-24 07:29:08 -05:00
penpot/exporter/src/app/config.cljs

27 lines
691 B
Text
Raw Normal View History

;; This Source Code Form is subject to the terms of the Mozilla Public
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
2021-04-10 09:43:04 +02:00
;; Copyright (c) UXBOX Labs SL
(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
2021-01-28 16:27:18 +01:00
{:public-uri (:penpot-public-uri env "http://localhost:3449")})