add default port for dart app (#792)

This commit is contained in:
Zou Nengren 2019-01-24 02:12:34 +08:00 committed by Knative Prow Robot
parent 1f82af8489
commit 49494addfa
1 changed files with 1 additions and 1 deletions

View File

@ -5,7 +5,7 @@ import 'package:shelf/shelf_io.dart';
void main() { void main() {
// Find port to listen on from environment variable. // 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. // Read $TARGET from environment variable.
var target = Platform.environment['TARGET'] ?? 'World'; var target = Platform.environment['TARGET'] ?? 'World';