Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
Configure for deployed server
Browse files Browse the repository at this point in the history
  • Loading branch information
GravityDarkLab committed Jan 30, 2024
1 parent aa505d7 commit 061c9c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
2 changes: 1 addition & 1 deletion lib/base/networking/api/handler/grpc_handler.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class GrpcHandler {
_channel = ClientChannel(
host,
port: port,
options: const ChannelOptions(credentials: ChannelCredentials.insecure()),
options: const ChannelOptions(credentials: ChannelCredentials.secure()),
);
}

Expand Down
18 changes: 3 additions & 15 deletions lib/config/app_config.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import 'dart:io';

/// AppConfig - Defines the configuration for the application.
class AppConfig {
static const String appName = 'GoCast Mobile';
Expand All @@ -10,14 +8,7 @@ class AppConfig {

// Determine the root URL based on the platform
// Used for development only. Once the api is deployed, this can be ignored.
static String get _rootUrl {
if (Platform.isAndroid) {
return 'http://10.0.2.2:8081/api';
} else if (Platform.isIOS) {
return 'http://localhost:8081/api';
}
throw UnsupportedError('Unsupported platform');
}
static String get _rootUrl => 'https://1279.test.live.mm.rbg.tum.de';

// Authentication URLs
static String get basicAuthUrl =>
Expand All @@ -28,13 +19,10 @@ class AppConfig {
static String get ssoRedirectUrl => 'https://live.rbg.tum.de';

// gRPC routes
static String get grpcHost {
return Platform.isAndroid ? '10.0.2.2' : 'localhost';
}
static String get grpcHost => 'grpc-1279.test.live.mm.rbg.tum.de';

static const int grpcPort = 8081;
static const int grpcPort = 443;
}

/// Routes - Defines HTTP and gRPC routes for the application.
class Routes {
Routes._(); // Private constructor
Expand Down

0 comments on commit 061c9c6

Please sign in to comment.