Dynamic per-environment configuration which can be loaded at run-time negating the need to recompile between environments.
-- typical local development Development: host: localhost port: 3000 -- ssl: will default false -- approot: will default to "http://localhost:3000"
-- typical outward-facing production box Production: host: www.example.com -- ssl: will default false -- port: will default 80 -- approot: will default "http://www.example.com"
-- maybe you're reverse proxying connections to the running app -- on some other port Production: port: 8080 approot: "http://example.com" -- approot is specified so that the non-80 port is not appended -- automatically.
|:: Show e|
the yaml file
the environment you want to load
|-> (TextObject -> IO a)|
what to do with the mapping
|-> IO a|
Loads the configuration block in the passed file named by the passed environment, yeilds to the passed function as a mapping.
Errors in the case of a bad load or if your function returns