@@ -5,7 +5,7 @@
5-- In particular, merging environment variables with yaml values
5-- In particular, merging environment variables with yaml values
7-- 'loadYamlSettings' is a high-level API for loading YAML and merging environment variables.
7-- 'loadYamlSettings' is a high-level API for loading YAML and merging environment variables.
8−-- A yaml value of @_env:ENV_VAR:default@ will lookup the environment variable @ENV_VAR@.
8+-- A yaml value of @_env:ENV_VAR:default@ or just @_env:ENV_VAR@ will lookup the environment variable @ENV_VAR@.
10-- On a historical note, this code was taken directly from the yesod web framework's configuration module.
10-- On a historical note, this code was taken directly from the yesod web framework's configuration module.
11module Data.Yaml.Config
11module Data.Yaml.Config
@@ -185,6 +185,11 @@ requireCustomEnv = RequireCustomEnv
186-- > loadYamlSettings ["config/foo.yaml"] [] useEnv
186-- > loadYamlSettings ["config/foo.yaml"] [] useEnv
188+-- Alternatively you can configure settings through the Yaml @Value@ directly in Haskell.
189+-- For example, to load up settings from only from environment variables, you can use:
191+-- > loadYamlSettings [] [object ["connectionString" .= ("_env:DATABASE_URL" :: String)]] requireEnv
188-- @since 0.8.16
193-- @since 0.8.16
189loadYamlSettings
194loadYamlSettings
190 :: FromJSON settings
195 :: FromJSON settings