Skip to content

Introduce a static config map

Asbjørn Olling requested to merge static-config-map into main

Introduce a static config map to pass around - avoids runtime getenv calls, makes a bunch of stuff pure again, and makes for smaller function signatures.

The idea is that this map is constructed fomr environment vars at start-up and is never changed or updated.

The map has four fields, and generally looks like this:

{:path          (or (System/getenv "LYDBOG_PATH") "/tmp/")
 :public-url    (or (System/getenv "PUBLIC_URL") "http://localhost:3000/")
 :podcast-name  (or (System/getenv "PODCAST_NAME") "Lydbog")
 :art-url       (or (System/getenv "ART_URL") "http://localhost:3000/art.png")}

Merge request reports