-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.js
35 lines (29 loc) · 967 Bytes
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
var client_url = function client_url() {
console.log('--- Config ---');
console.log('node environment', process.env.APP_ENV);
var client_url = "";
if (process.env.APP_ENV === "local" || process.env.APP_ENV === "c9")
client_url = "http://localhost:8080";
else
client_url = process.env.SCI_CLIENT_URL;
console.log('client_url:', client_url);
return client_url;
}
var server_url = function server_url() {
console.log('--- Config ---');
console.log('node environment', process.env.APP_ENV);
var server_url = "";
if(process.env.APP_ENV === "c9")
server_url = "localhost:8080";
else if (process.env.APP_ENV === "local")
server_url = "http://localhost:3000";
else
server_url = process.env.SCI_SERVER_URL;
console.log('server_url:', server_url);
return server_url;
}
var config = {
client_url: client_url(),
server_url: server_url()
}
module.exports = config;