mchess-client/lib/utils/config.dart

35 lines
634 B
Dart
Raw Normal View History

const prodURL = 'chess.sw-gross.de:9999';
const debugURL = 'localhost:8080';
2024-05-19 19:18:47 +00:00
const useDbgUrl = true;
String getHostURL() {
var prot = 'https';
var domain = prodURL;
2024-02-05 09:35:28 +00:00
if (useDbgUrl) {
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) {
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) {
prot = 'ws';
domain = debugURL;
}
return '$prot://$domain/api/ws';
}