Skip to content

Commit d1fca47

Browse files
Add CN api base config
1 parent 04bc84d commit d1fca47

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

app/js/np.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
//Environment that should be set from outside //TODO should replace this using GRUNT
4141

4242
// default environment when environment is not set by some external deployment script
43-
var nxEnvironment = "alpha"; //env can be replaced, by dev, alpha or pro by nxs script on deploy
43+
var nxEnvironment = "NX_ENV"; //env can be replaced, by dev, alpha or pro by nxs script on deploy
4444
// WARNING !!! DO NOT USE NX_ENV ANYWHERE ELSE IN THE PROJECT. A script replace its value by the current environment value just before deployment !
4545
var apiBase = "https://dev-api.nextprot.org"; //default for UI developers on MACs
4646
var np1Base = 'https://uat-web1'; //default for UI developers on MACs
@@ -64,7 +64,11 @@
6464
else if (nxEnvironment.toLowerCase() === "alpha" || nxEnvironment.toLowerCase() === "build") {
6565
apiBase = 'https://' + nxEnvironment.toLowerCase() + '-api.nextprot.org';
6666
np1Base = 'http://uat-web1';
67-
} else { // By default use the dev env, No need to change for local testing
67+
} else if (nxEnvironment.toLowerCase() === "cn") {
68+
apiBase = 'https://' + nxEnvironment.toLowerCase() + '-api.nextprot.org';
69+
}
70+
71+
else { // By default use the dev env, No need to change for local testing
6872
apiBase = 'https://dev-api.nextprot.org'; // Don't forget https!
6973
np1Base = 'https://uat-web1';
7074
}

config.coffee

+6-1
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,13 @@
1111
#production_environnement = true;
1212
#local_environnement = false;
1313

14+
####### FOR CN Environment
15+
#production_environnement = false;
16+
#local_environnement = false;
17+
18+
1419
production_environnement = false;
15-
local_environnement = true;
20+
local_environnement = false;
1621

1722
# endpoint = if production_environnement then "https://d2t3grwcyftpfv.cloudfront.net/" else ""
1823

0 commit comments

Comments
 (0)