Applications may be configured via file.
Your development environment (aka sandbox), can read application-specific configurations files and provision this to each app. By default, it will scan the folder located in
|The config folder also contains the standard XP configuration files.
Simply adding or updating a file called
<appname>.cfg in the config folder will automatically restart your application, and provision the new configuration values.
This is a hot restart, and will typically be very fast. XP itself does not need to be restarted.
|If you’re operating an XP cluster, the configuration file should be copied to every server node - this is because XP by default will run all applications on every node in the cluster.
Given the following configuration file:
secretkey = 123456789
The value can be optained using a single line of code:
var myKey = app.config.secretkey;