javascript serverside to get server name

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Member II

javascript serverside to get server name

Hi, for a javascript program, I want to differentiate the way the program works in the production environment and in the test environment.

The only difference between the two installation is the server name : prod.mycompany.fr vs test.mycompany.fr.

So, is there a way to get the server name information from a server-side javascript program ?

Note : if this is impossible, perhap's there's a way to do that using alfresco-global.properties but once more, how to get a property set in this file from a serverside javascript  program ?

Thanks for sharing ideas, Pierre

2 Replies
Highlighted
Alfresco Employee

Re: javascript serverside to get server name

Afaik, this is still the only way to access to Global Properties from server JavaScript:

 

Software Engineer in Alfresco Search Team.
Highlighted
Member II

Re: javascript serverside to get server name

I'm not sure I undestand the way this works and I did not found any sample explaining how to set both js ans config file.

But it seems that there are some limitations (not really undestoood which one) so are there any other ideas to share ?

Thanks, Pierre