You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 7
Next »
So you want to reuse your code across more than one site. But that means storing configuration information unique to each site so your code will behave the way it needs to.
What tools do you have to do that?
Custom fields
Custom Fields are a good method for configuring details which apply for to a specific component.
You can create custom fields in the Translator config.json file and include default values that are stored in source control. Custom fields entered in the Component Card are encrypted and stored locally in the working directory.
See Custom Fields.
Environmental variables
These are good for dealing with properties which need to be defined across the server.
Environment variables are stored locally in the working directory in IguanaEnv.txt.
See Environment Variables
Other techniques like having the ability to load configuration files from other components.
I wrote a small library to allow one to load a JSON file from another component when you supply the name of the component and the name of the file.
This might be helpful: CONFIG Library
Less is more
It’s a good idea to reduce the number of configuration parameters if you can. Less is more.
If you find you never change a setting, consider removing that setting from your list of configuration parameters. Try and simplify things. See What are bottlenecks and why do they matter?
For instance say you need to configure retry settings for your HL7 listeners - why not come up with some universal settings that ‘just work’ at 100% of your sites without needing any special configuration - does not seem like a better idea than engaging in busy work?
I think this is a topic we’re interested in discussing more - there are probably some additional things we could do to make this easier.