Fork me on GitHub
#leiningen
<
2022-03-30
>
dmegas18:03:07

Hello all, I was thinking of using the https://github.com/tpope/lein-dotenv plugin as a library, so that I can easily change env vars during development without having to restart my REPL. It seems this plugin uses the (deprecated?) hooks system and I’m not able to wrap my head around it. If anyone has any pointers to get me started I’d really appreciate it!

vemv18:03:56

I'd recommend giving Java system properties a try if you haven't - they're very idiomatic and can be altered at runtime (and from lein config e.g. a specific file) If going the env route, I'd recommend more something more modern like https://github.com/juxt/aero where env is just one of the options. e.g. use the env in production, use this fixed value in dev, etc

dmegas18:03:31

Thanks for the suggestions! Since this is a legacy customer product that already uses lein-dotenv (and duct for that matter) I’m not sure I’ll be able to introduce sth like aero.