medic / cht-core

The CHT Core Framework makes it faster to build responsive, offline-first digital health apps that equip health workers to provide better care in their communities. It is a central resource of the Community Health Toolkit.
https://communityhealthtoolkit.org
GNU Affero General Public License v3.0
438 stars 206 forks source link

Add @medic/environment shared library #9081

Closed dianabarsan closed 1 month ago

dianabarsan commented 3 months ago

Describe the issue We have some duplicate code accessing process.env.COUCH_URL: https://github.com/search?q=repo%3Amedic%2Fcht-core+COUCH_URL+language%3AJavaScript+NOT+path%3A%2F%5Escripts%5C%2F%2F&type=code&l=JavaScript

Describe the improvement you'd like Add a shared-library @medic/environment that processes environment variables and exports parsed / generic data to be reused.

Describe alternatives you've considered None.

mrjones-plip commented 3 months ago

Moving to 4.9 to unblock 4.8 release