2024-01-17 21:50:02 +00:00
|
|
|
const prodURL = 'chess.sw-gross.de:9999';
|
|
|
|
const debugURL = 'localhost:8080';
|
|
|
|
|
2024-02-05 09:35:28 +00:00
|
|
|
const useDbgUrl = false;
|
2024-01-17 21:50:02 +00:00
|
|
|
|
|
|
|
String getHostURL() {
|
|
|
|
var prot = 'https';
|
|
|
|
var domain = prodURL;
|
2024-02-05 09:35:28 +00:00
|
|
|
if (useDbgUrl) {
|
2024-01-17 21:50:02 +00:00
|
|
|
prot = 'http';
|
|
|
|
domain = debugURL;
|
|
|
|
}
|
|
|
|
return '$prot://$domain/api/hostPrivate';
|
|
|
|
}
|
|
|
|
|
|
|
|
String getJoinURL() {
|
|
|
|
var prot = 'https';
|
|
|
|
var domain = prodURL;
|
2024-02-05 09:35:28 +00:00
|
|
|
if (useDbgUrl) {
|
2024-01-17 21:50:02 +00:00
|
|
|
prot = 'http';
|
|
|
|
domain = debugURL;
|
|
|
|
}
|
|
|
|
return '$prot://$domain/api/joinPrivate';
|
|
|
|
}
|
|
|
|
|
|
|
|
String getWebsocketURL() {
|
|
|
|
var prot = 'wss';
|
|
|
|
var domain = prodURL;
|
2024-02-05 09:35:28 +00:00
|
|
|
if (useDbgUrl) {
|
2024-01-17 21:50:02 +00:00
|
|
|
prot = 'ws';
|
|
|
|
domain = debugURL;
|
|
|
|
}
|
|
|
|
return '$prot://$domain/api/ws';
|
|
|
|
}
|