-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.js
27 lines (22 loc) · 1.01 KB
/
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
const config = {}
// ----------------------------- MAKE CHANGES BELOW -----------------------
// let api = 'prod'
// let api = 'test'
// let api = 'local'
let api = window.location.origin.includes('localhost') ? 'test' : 'prod'
// ----------------------------- MAKE CHANGES ABOVE -----------------------
// -------------------------- DO NOT MAKE CHANGES BELOW -------------------
api = window.location.origin.includes('intellecture.app') ? 'prod' : api;
if (api === 'prod') {
config.serverOrigin = 'https://api.intellecture.app'
config.socketServerOrigin = 'wss://api.intellecture.app'
} else if (api === 'test') {
config.serverOrigin = 'https://test-api.intellecture.app'
config.socketServerOrigin = 'wss://test-api.intellecture.app'
} else if (api === 'local') {
config.serverOrigin = 'http://localhost:8080'
config.socketServerOrigin = 'ws://localhost:8080'
}
// Whether to print errors to console
config.printErrors = process.env.NODE_ENV === 'development'
export default { ...config, api }