Jonathon McKitrick writes: > I just read about leiningen profiles, and I'm trying to figure out how to > access those settings within my code for db selection. > > What are the canonical ways to do this?
Two ways: one is to use .clj data files on the classpath and take advantage of the fact that different profiles put different resources directories on the classpath. This is the approach taken by Carica (https://github.com/sonian/carica) and works great if you have complex config with nested values. The other approach is to use environment variables; the best tool for that is Environ: https://github.com/weavejester/environ -Phil
pgp6PTnriGgt5.pgp
Description: PGP signature