Fork me on GitHub
#luminus
<
2020-08-18
>
ballpark18:08:48

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?

jumar05:08:36

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).