dev / templates / app-cljs-live / client / src / __NAME__ / config.cljs
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
;; App-wide constants. The Vite-era `import.meta.env.VITE_ID_BRIDGE_URL`
;; becomes a goog-define: scripts/dev.mjs and build.mjs read the same env var
;; and inject it via --config-merge. Empty string = use the id-kit default
;; (https://ardegazu.ro/id/).
(ns __NAME__.config)

(goog-define ID-BRIDGE-URL "")

;; Namespaces our rooms on the shared p2p app (v2 = the live/game stack).
(def APP-SALT "__HOST__/v2")
(def TURN-URL "https://signal.ardegazu.ro/turn-credentials")
(def AP2P-DESCRIPTOR-URL "https://signal.ardegazu.ro/.well-known/ap2p")
;; Compiled-in fallback when the descriptor fetch fails (see net/bootstrap).
(def RELAY-FALLBACK
  (js-obj "peerId" "12D3KooWQzZvygPwd2F4JAqqf6tfBSJ29YtjzzftUyJ37RLCG5WT"
          "multiaddrs" #js ["/dns4/signal.ardegazu.ro/tcp/443/tls/ws/p2p/12D3KooWQzZvygPwd2F4JAqqf6tfBSJ29YtjzzftUyJ37RLCG5WT"]))

;; ---- app constants go below (limits, sizes, colors, timings, …) ----

;; Demo: max note length (matches the input's maxlength).
(def NOTE-MAX 280)

;; guarded so pure namespaces stay loadable under node (tests)
(def IS-TOUCH
  (boolean (and (exists? js/matchMedia)
                (.-matches (js/matchMedia "(pointer:coarse)")))))

static mirror of HEAD · about · clone: git clone https://git.ardegazu.ro/dev.git