mchess-client/lib/utils/config.dart

35 lines
644 B
Dart
Raw Normal View History

const prodURL = 'chess.sw-gross.de:9999';
const debugURL = 'localhost:8080';
const useDbgUrl = true;
String getCreateGameURL() {
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 getJoinGameURL() {
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';
}