Skip to content
Ahrnee edited this page Nov 26, 2018 · 4 revisions

Has the dotenv library been considered for configuration files?

Originally dotenv was used, but we found that in the end it made more work for our use-case (below)

Config Goals:

  • Strong typing (with intellisense support)
  • Segmentable config (across packages, and for environments)
  • Injectable (to support unit testing)

TypeScript enables supports Object Literals out of the box, which achieve much of the above out-of-the box. The only thing that remained was a mechanism for merging segmented configs - for which merge function in lowdash was used.

Clone this wiki locally