BillBryson
Configuring child application thoughts
I am working on an Elixir application that I’d like to package up as a Hex dependency. As part of that, it will take some simple configuration options (module names of the parent application to be monitored, etc.). My question is - for these configuration options what would you consider when deciding how to load the configuration?
Idea 1: I am looking at passing in the options - along with my application module - as a child in the Application.start/2 callback.
Idea 2: Don’t start the application via the Application.start/2 callback and instead load the configuration options via the config/config|prod|dev.exs files.
What things would you consider when choosing between the two?
Most Liked
carlgleisner
I ran into this old thread and saw there were no responses.
For posterity, there is terrific guidance in the anti-pattern guides in the Elixir documentation.
Cheers ![]()
Popular in Discussions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #javascript
- #code-sync
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









