From 49494addfaaf4a6cb1abe86df5d3fa92ec9930df Mon Sep 17 00:00:00 2001 From: Zou Nengren Date: Thu, 24 Jan 2019 02:12:34 +0800 Subject: [PATCH] add default port for dart app (#792) --- serving/samples/helloworld-dart/bin/server.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/serving/samples/helloworld-dart/bin/server.dart b/serving/samples/helloworld-dart/bin/server.dart index a431c33f0..d59ac0e79 100644 --- a/serving/samples/helloworld-dart/bin/server.dart +++ b/serving/samples/helloworld-dart/bin/server.dart @@ -5,7 +5,7 @@ import 'package:shelf/shelf_io.dart'; void main() { // Find port to listen on from environment variable. - var port = int.tryParse(Platform.environment['PORT']); + var port = int.tryParse(Platform.environment['PORT']) ?? 8080; // Read $TARGET from environment variable. var target = Platform.environment['TARGET'] ?? 'World';