cancel
Showing results for 
Search instead for 
Did you mean: 

javascript serverside to get server name

pierat
Champ in-the-making
Champ in-the-making

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 2

angelborroy
Community Manager Community Manager
Community Manager

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

 

Hyland Developer Evangelist

pierat
Champ in-the-making
Champ in-the-making

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