JSON Config

Develop once, deploy everywhere

This component reads a json.file and exposes values depending on the TD_ENV-Variable to your project. This way you can set differrent values depending on the env-variable. Extremy usefull for multi-pc-deployments.
Under Windows use
setx [variable_name] "[variable_value]"
to permanently set the env-variable, or a simple 
set TD_ENV=variablevalue
before starting in a .bat file.

  • Environment: Which environment is used atm.
  • File: Path to the json-config file. If it does not find one, it will creade an example-config for you.
  • Reload: Forces a reload on the config.

  • Data(): Returns a Dataclass-Object containing the config. 

  • Every config-member is exposed as a member of the Object-

  • DAT: A table representation of the config with the path as they would be used to access the member.

Downloads: 119

Created at: 6.2.2022

Uploaded: 7.6.2022
You can now define your own path to an example-config that will be created when the files does not exist.