Reputation: 2845
I have to access few WL Server properties (from worklight.properties) in the Adapter JS file. I know we can access properties in the Adapter xml file but I have to access in the JS file.
{ WL.Server.configuration["local.IPAddress"] }
Is this possible?
Upvotes: 0
Views: 710
Reputation: 44516
The answer is yes.
For example, using a newly created adapter,
I've added the following before the return
in the getStories()
function:
WL.Logger.info("##################### Worklight protocal: " + WL.Server.configuration["publicWorkLightProtocol"]);
In order to see this log line in the Worklight Development Server's console in Eclipse, go to and change:
Run As > Deploy Worklight Adapter
Run As > Invoke Worklight Procedure
Upvotes: 2