Improved environment detection in web-service demo