Skip to content

Commit

Permalink
Remove port
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardocustodio committed Sep 24, 2024
1 parent fb3c9bd commit febb040
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
1 change: 0 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
NUMBER_OF_ISOLATES=
DEFAULT_BIND_PORT=
SPEC_PER_ISOLATE=
SPEC_EXPIRE_DURATION=
6 changes: 1 addition & 5 deletions bin/server.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import 'package:platform_decoder/handler/general.dart';
import 'package:shelf_plus/shelf_plus.dart';

int numberOfIsolates = 8;
int defaultBindPort = 8090;

final logger = Logger('Decoder');

Expand All @@ -16,16 +15,13 @@ void loadConfig() {

numberOfIsolates =
int.tryParse(env.getOrElse('NUMBER_OF_ISOLATES', () => '8')) ?? 8;
defaultBindPort =
int.tryParse(env.getOrElse('DEFAULT_BIND_PORT', () => '8090')) ?? 8090;
int specPerIsolate =
int.tryParse(env.getOrElse('SPEC_PER_ISOLATE', () => '4')) ?? 4;
int specExpireDuration =
int.tryParse(env.getOrElse('SPEC_EXPIRE_DURATION', () => '300')) ?? 300;

logger.info('Starting Platform Decoder v2.1.0');
logger.info('Number of isolates: $numberOfIsolates');
logger.info('Default bind port: $defaultBindPort');
logger.info('Spec per isolate: $specPerIsolate');
logger.info('Spec expire duration: $specExpireDuration');
}
Expand All @@ -48,7 +44,7 @@ void spawnServer(_) => shelfRun(
init,
defaultBindAddress: InternetAddress.anyIPv4,
defaultShared: true,
defaultBindPort: defaultBindPort,
defaultBindPort: 8090,
defaultEnableHotReload: false,
);

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: platform_decoder
description: Enjin Platform Decoder
version: 2.1.0
version: 2.1.1
publish_to: none

environment:
Expand Down

0 comments on commit febb040

Please sign in to comment.