Using a JSON File to Override App Property Values

Note: The information in this section is applicable for an app executable only.

To override an app prop using a JSON file:

    Procedure
  1. In the JSON file, make sure that the app property which you want to override is set as follows:
    "<property>":"<value>"
    For example:

    {
    "IntegerOverrideVal":453,
    "StringOverridingValue":"hello",
    "BoolValue":true
    }
    Note: Only for certificates, the format of the property must be: 
    "<property>":"<encoded_value>"
    To get the encoded value of the contents, you can use https://www.base64encode.org/ or any other base64 encoding tool.
  2. Execute the binary of the app using the FLOGO_APP_PROPS_JSON environment variable as follows:
    FLOGO_APP_PROPS_JSON=/<filepath>/<JSON filename>.json ./<binary>

Example: Overriding a Certificate Using a JSON File

You can override a server key and certificate using an app property. You would, typically, need to override a certificate if the existing certificate has expired or you want to use a custom certificate. You can directly override the certificate at runtime instead of re-configuring the app. In such a case:

    Procedure
  1. In the JSON file, set the ServerKey and ServerCertificate app properties as follows: 
  2. {

    "ServerKey":"LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCk1JSUV2Z0l",

    "ServerCertificate":"LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1J",

    }

  3. Execute the binary of the app using the FLOGO_APP_PROPS_JSON environment variable as follows:
    FLOGO_APP_PROPS_JSON=/home/john/Downloads/appPropOverride.json ./RestSSLService-linux_amd64