-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconnection.js
More file actions
34 lines (30 loc) · 875 Bytes
/
Copy pathconnection.js
File metadata and controls
34 lines (30 loc) · 875 Bytes
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
// Decorator class made for giving request URL's into html's
class Connection {
env
test = 'localhost'
prod = '84.201.163.74'
constructor(env) {
this.env = env;
}
getWebsocketConnection(){
if (this.env === 'test'){
return 'wss://' + this.test + ':8080'
} else if (this.env === 'prod') {
return 'wss://' + this.prod + ':8080'
}
}
getAuthServiceConnection() {
if (this.env === 'test'){
return 'http://' + this.test + ':8081'
} else if (this.env === 'prod') {
return 'http://' + this.prod + ':8081'
}
}
getStorageServiceConnection() {
if (this.env === 'test'){
return 'http://' + this.test + ':8080'
} else if (this.env === 'prod') {
return 'http://' + this.prod + ':8080'
}
}
}