An omniconf inspired config library using malli
malapropism is deployed to Clojars
Configuration is one of the peripheries of our systems. It's a good place to ensure correctness. Enter malli, a library that I've really grown to appreciate.
Configuration should be flexible. Most solutions in this space assume too much.
With malapropism,
(require '[org.passen.malapropism.core :as malapropism])
(def config-schema
[:map
[:env-key :keyword]
[:scm-rev :string]
[:port :int]
[:prefix
{:default "/api"}
:string]])
(-> (malapropism/with-schema config-schema)
(malapropism/with-values-from-env)
(malapropism/with-values-from-system)
(malapropism/with-values-from-map
{:env-key :dev
:scm-rev "923345"
:port 8080
:prefix "/web"})
(malapropism/verify! :verbose? true))
These companies use malapropism. Feel free to add your company to the list.
Copyright © 2022-2023 Derek Passen
Released under an MIT license.
Can you improve this documentation? These fine people already did:
Derek Passen & Luke JohnsonEdit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close