-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathservices.js
More file actions
43 lines (40 loc) · 1.49 KB
/
services.js
File metadata and controls
43 lines (40 loc) · 1.49 KB
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
const { getHostEnvName } = require('../clients/server-env');
const envValues = {
production: {
host: 'api.shoutem.com',
appBuilder: 'https://builder.shoutem.com',
analyticsTrackingId: 'UA-807293-5',
},
dev: {
host: 'api.dev.sauros.hr',
appBuilder: 'https://builder.dev.sauros.hr',
},
qa: {
host: 'api.qa.shoutm.net',
appBuilder: 'https://builder.qa.shoutm.net',
},
local: {
host: process.env.SHOUTEM_CLI_HOST || 'shoutem.local',
appBuilder:
process.env.SHOUTEM_CLI_APP_BUILDER ||
'http://builder.shoutem.local:3000',
appManager: process.env.SHOUTEM_CLI_APP_MANAGER || 'http://localhost:3003',
authService:
process.env.SHOUTEM_CLI_AUTH_SERVICE || 'http://localhost:3010',
extensionManager:
process.env.SHOUTEM_CLI_EXTENSION_MANAGER || 'http://localhost:3002',
legacyService:
process.env.SHOUTEM_CLI_LEGACY_SERVICE || 'http://v4.api.shoutem.local',
},
};
const env = envValues[getHostEnvName()];
module.exports = {
appBuilder: env.appBuilder || `https://builder.${env.host}`,
appManager: env.appManager || `https://apps.${env.host}`,
authService: env.authService || `https://auth.${env.host}`,
extensionManager: env.extensionManager || `https://extensions.${env.host}`,
legacyService: env.legacyService || `https://v4.${env.host}`,
cliAppUri: 'http://registry.npmjs.org/@shoutem%2fcli',
mobileAppUrl: 'https://github.com/shoutem/platform',
analyticsTrackingId: env.analyticsTrackingId || 'UA-807293-12',
};