When building the application - a customisable app_config.json file should be copied to the dist folder
The app_config JSON should contain configuration values that are needed for the login screen before a user logs in
After logging in additional configuration, applicable to the current user, will be available from the backend API
The same instance of the app may be accessible from multiple domains, e.g. dev.opencdms.org and kenya.openclimate.net - the app_config JSON may therefore have multiple configurations depending on which URL the app is being accessed from
In the above example, only "domains" is mandatory. Other config values can assume defaults like "en-EN" language and "opencdms" mode. Defaults would also be used if the config values were invalid or not yet supported.
The image below shows the login screen with two additional dropdown boxes. The first allows the user to select the 'domain' being logged into (API being used). Once an API is selected, the front-end will query the API to ask what databases are available (e.g. {"production": "prod_db", "test_db": "test_db"}).
app_config.json
file should be copied to thedist
folderdev.opencdms.org
andkenya.openclimate.net
- the app_config JSON may therefore have multiple configurations depending on which URL the app is being accessed fromExample JSON
In the above example, only "domains" is mandatory. Other config values can assume defaults like "en-EN" language and "opencdms" mode. Defaults would also be used if the config values were invalid or not yet supported.
The image below shows the login screen with two additional dropdown boxes. The first allows the user to select the 'domain' being logged into (API being used). Once an API is selected, the front-end will query the API to ask what databases are available (e.g.
{"production": "prod_db", "test_db": "test_db"}
).