Fork me on GitHub

I'm working on a non-luminus project, and need to pull in a database connection. A lot of my web projects are luminus, and I noticed luminus a dynamic variable for the db connection. Can anyone explain to me why a dynamic variable was chosen and not an atom, or any other option?


Presumably to be able to use different "db" in different contexts? (e.g. tests). Anyway, I'd lean towards passing the db connection as an explicit parameter (e.g. by using component instead of mount or whatever).

👍 1