-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathglobal-config.js
executable file
·101 lines (99 loc) · 5.06 KB
/
global-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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
const apiGatewayPort = 7770;
const apiUsersPort = 7771;
const apiMessagesPort = 7772;
const apiMapsPort = 7773;
const apiReactionsPort = 7774;
const apiPushNotificationsPort = 7775;
const clientPort = 7070;
const dashboardClientPort = 7071;
const websocketPort = 7743;
const hostDev = '127.0.0.1';
const hostStage = 'stage.therr.com';
const dashboardHostStage = 'stage.dashboard.therr.com';
const hostProd = 'therr.com';
const dashboardHostProd = 'dashboard.therr.com';
const googleOAuth2WebClientId = '718962923226-k1ejo7drgp89h7b375ifkda4l1vapevr.apps.googleusercontent.com';
module.exports = {
any: {
googleOAuth2WebClientId
},
development: {
baseApiGatewayRoute: `http://${hostDev}:${apiGatewayPort}/v1`,
baseMapsServiceRoute: `http://${hostDev}:${apiMapsPort}/v1`,
baseMessagesServiceRoute: `http://${hostDev}:${apiMessagesPort}/v1`,
basePushNotificationsServiceRoute: `http://${hostDev}:${apiPushNotificationsPort}/v1`,
baseReactionsServiceRoute: `http://${hostDev}:${apiReactionsPort}/v1`,
baseSocketUrl: `http://${hostDev}:${websocketPort}`,
baseUsersServiceRoute: `http://${hostDev}:${apiUsersPort}/v1`,
baseImageKitEndpoint: 'https://ik.imagekit.io/qmtvldd7sl/dev/',
googleAnalyticsKey: 'G-WNB4XQ8W1Z',
googleAnalyticsKeyDashboard: 'G-Z8R2CE2Z7C',
googleOAuth2WebClientId,
googleOAuth2WebClientIdAndroid: '718962923226-k1ejo7drgp89h7b375ifkda4l1vapevr.apps.googleusercontent.com',
googleOAuth2WebClientIdiOS: '718962923226-os68t9a1pi6giap1l447r3vtshf2ie3c.apps.googleusercontent.com',
host: hostDev,
hostFull: `http://${hostDev}:${clientPort}`,
dashboardHost: hostDev,
dashboardHostFull: `http://${hostDev}:${dashboardClientPort}`,
socket: {
clientPath: '/socketio',
pingInterval: 1000 * 10,
pingTimeout: 1000 * 15,
userSocketSessionExpire: 1000 * 60 * 30,
},
tempLocationExpansionDistMeters: 100000,
},
stage: {
baseApiGatewayRoute: `https://api.${hostStage}/v1`,
baseMapsServiceRoute: `http://maps-service-cluster-ip-service:${apiMapsPort}/v1`,
baseMessagesServiceRoute: `http://messages-service-cluster-ip-service:${apiMessagesPort}/v1`,
basePushNotificationsServiceRoute: `http://push-notifications-service-cluster-ip-service:${apiPushNotificationsPort}/v1`,
baseReactionsServiceRoute: `http://reactions-service-cluster-ip-service:${apiReactionsPort}/v1`,
baseSocketUrl: `https://websocket-service.${hostStage}`,
baseUsersServiceRoute: `http://users-service-cluster-ip-service:${apiUsersPort}/v1`,
baseImageKitEndpoint: 'https://ik.imagekit.io/qmtvldd7sl/',
googleAnalyticsKey: 'G-WNB4XQ8W1Z',
googleAnalyticsKeyDashboard: 'G-Z8R2CE2Z7C',
googleOAuth2WebClientId,
googleOAuth2WebClientIdAndroid: '718962923226-k1ejo7drgp89h7b375ifkda4l1vapevr.apps.googleusercontent.com',
googleOAuth2WebClientIdiOS: '718962923226-os68t9a1pi6giap1l447r3vtshf2ie3c.apps.googleusercontent.com',
host: hostStage,
hostFull: `https://${hostStage}`,
dashboardHost: dashboardHostStage,
dashboardHostFull: `http://${dashboardHostStage}`,
socket: {
clientPath: '/socketio',
pingInterval: 1000 * 10,
pingTimeout: 1000 * 5,
userSocketSessionExpire: 1000 * 60 * 30,
},
tempLocationExpansionDistMeters: 100000,
},
production: {
baseApiGatewayRoute: `https://api.${hostProd}/v1`,
baseMapsServiceRoute: `http://maps-service-cluster-ip-service:${apiMapsPort}/v1`,
baseMessagesServiceRoute: `http://messages-service-cluster-ip-service:${apiMessagesPort}/v1`,
basePushNotificationsServiceRoute: `http://push-notifications-service-cluster-ip-service:${apiPushNotificationsPort}/v1`,
baseReactionsServiceRoute: `http://reactions-service-cluster-ip-service:${apiReactionsPort}/v1`,
baseSocketUrl: `https://websocket-service.${hostProd}`,
baseUsersServiceRoute: `http://users-service-cluster-ip-service:${apiUsersPort}/v1`,
baseImageKitEndpoint: 'https://ik.imagekit.io/qmtvldd7sl/',
googleAnalyticsKey: 'G-WNB4XQ8W1Z',
googleAnalyticsKeyDashboard: 'G-Z8R2CE2Z7C',
googleOAuth2WebClientId,
// Implement these along with server side logic to select the corresponding "audience" (ie. android, ios, web client_id)
googleOAuth2WebClientIdAndroid: '718962923226-k1ejo7drgp89h7b375ifkda4l1vapevr.apps.googleusercontent.com',
googleOAuth2WebClientIdiOS: '718962923226-1rhet8adgsvuviutj7ja2006bhcncr87.apps.googleusercontent.com',
host: hostProd,
hostFull: `https://${hostProd}`,
dashboardHost: dashboardHostProd,
dashboardHostFull: `https://${dashboardHostProd}`,
socket: {
clientPath: '/socketio',
pingInterval: 1000 * 10,
pingTimeout: 1000 * 5,
userSocketSessionExpire: 1000 * 60 * 30,
},
tempLocationExpansionDistMeters: 100000,
},
};