Skip to content

Commit 123d013

Browse files
committed
testing with EXHORT_BACKEND_URL
1 parent c81602c commit 123d013

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

src/index.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,20 @@ function selectExhortBackend(opts = {}) {
102102
readAndPrintVersionFromPackageJson();
103103
}
104104

105-
const result = getCustom('EXHORT_BACKEND_URL', undefined, opts);
105+
let url;
106+
if (getCustom('EXHORT_DEV_MODE', false, opts)) {
107+
url = 'https://exhort.stage.devshift.net';
108+
} else {
109+
url = getCustom('EXHORT_BACKEND_URL', undefined, opts);
110+
}
106111

107-
if (!result) {
112+
if (!url) {
108113
throw new Error(`EXHORT_BACKEND_URL is unset`)
109114
}
110115

111-
logOptionsAndEnvironmentsVariables("Chosen exhort backend URL:", result)
116+
logOptionsAndEnvironmentsVariables("Chosen exhort backend URL:", url)
112117

113-
return result;
118+
return url;
114119
}
115120

116121
/**

0 commit comments

Comments
 (0)