An application developer needs to access Worklight server properties that are defined in the worklight.properties file.
Which of the following method definitions will enable the application developer to access the local.IPAddress property?
Object WL.Server.configuration
A map that contains all the server properties that are defined in the file worklight.properties.
Syntax
WL.Server.configuration ['property-name']
WL.Server.configuration.property-name
Both syntaxes are equivalent. When the property name contains a period ('.'), for example local.IPAddress, the array index syntax must be used.
Example
var addr = WL.Server.configuration['local.IPAddress'];
References: https://www.ibm.com/support/knowledgecenter/SSZH4A_6.0.0/com.ibm.worklight.help.doc/apiref/ r_object_wl_server_configuration.html
Currently there are no comments in this discussion, be the first to comment!