leiningen

dmegas 2022-03-30T18:29:07.699199Z

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!

vemv 2022-03-30T18:37:56.401179Z

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

dmegas 2022-03-30T18:41:31.438249Z

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.