This repository was archived by the owner on Jan 23, 2025. It is now read-only.
This repository was archived by the owner on Jan 23, 2025. It is now read-only.
Environment switch #67
Closed
Description
The current check for prod vs. dev doesn't work properly in dev:
var currEnv = '<%=ApplicationServer.ENVIRONMENT%>';
var prodEnv = '<%=ApplicationServer.PROD%>'
var scriptURL = '//uni-nav.topcoder-dev.com/v1/tc-universal-nav.js';
//TODO - fix this check. It's not working in dev, as far as I can tell.
/*if (currEnv === prodEnv) {
scriptURL = '//uni-nav.topcoder.com/v1/tc-universal-nav.js';
}*/
I have removed the prodEnv check so we can deploy and validate in dev, temporarily
Fix
In chatting with another copilot, we think it may be best just to test the server URL instead, like:
var serverName = '<%=ApplicationServer.SERVER_NAME%>';
var prodUrl = 'topcoder.com';
if (serverName === prodUrl) {
scriptURL = '//uni-nav.topcoder.com/v1/tc-universal-nav.js';
}
Metadata
Metadata
Assignees
Labels
No labels