How can I get the name of the servoy server? Our client has two servers. One is for testing and another one is for production.
I wanted to let the client know which server they are working on? Is there a function like application.getServerName(), so that I can set it in a global and display it for the client?
If there are only two servers and it may be temporary whilst you develop then why not hard code it into the method as in the following pseudo code :
//Gets the http server url
var url = application.getServerURL();
//Set a variable to a name based upon the IP
if(var == '10.0.0.20')
{
var server_name = 'Production Server'
}
else
{
var server_name = 'Test Server'
}
//Set a global field to the server name
globals.server = server_name