Skip to content
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
Closed
@jmgasper

Description

@jmgasper

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions