[erlang-questions] recommended ways to pass config to a dep app
Fri Nov 16 15:35:42 CET 2012
On Fri, Nov 16, 2012 at 8:28 AM, AD <> wrote:
> I am abstracting some code into a "library" that can be included in other
> applications. This library requires a fair bit of config options, what is
> the recommended approach here when starting it up?
> I noticed some libraries like cowboy, you pass all the configs into the
> main start_http() method, others use include files.
> Is there a preferred mechanism here when there are 20-25 config options for
> the included application?
The canonical approach is explained here:
The inets application is a good example of how one can hide a lot of
complexity behind the application abstraction, and use Erlang's
standard app config mechanism to customize behavior.
More information about the erlang-questions