2024-01-17 21:50:02 +00:00
|
|
|
const prodURL = 'chess.sw-gross.de:9999';
|
|
|
|
const debugURL = 'localhost:8080';
|
|
|
|
|
2024-05-19 15:22:06 +00:00
|
|
|
const useDbgUrl = true;
|
2024-01-17 21:50:02 +00:00
|
|
|
|
2024-05-19 15:22:06 +00:00
|
|
|
String getCreateGameURL() {
|
2024-01-17 21:50:02 +00:00
|
|
|
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';
|
|
|
|
}
|