diff --git a/code-samples/community/serving/helloworld-dart/bin/server.dart b/code-samples/community/serving/helloworld-dart/bin/server.dart index d6d2b1b3d3..87e8f26f28 100644 --- a/code-samples/community/serving/helloworld-dart/bin/server.dart +++ b/code-samples/community/serving/helloworld-dart/bin/server.dart @@ -23,7 +23,8 @@ void main(List args) async { final ip = InternetAddress.anyIPv4; // Configure a pipeline that logs requests. - final handler = Pipeline().addMiddleware(logRequests()).addHandler(_router); + final handler = + Pipeline().addMiddleware(logRequests()).addHandler(_router.call); // For running in containers, we respect the PORT environment variable. final port = int.parse(Platform.environment['PORT'] ?? '8080'); diff --git a/code-samples/community/serving/helloworld-dart/pubspec.yaml b/code-samples/community/serving/helloworld-dart/pubspec.yaml index d4b3242706..52303ec85e 100644 --- a/code-samples/community/serving/helloworld-dart/pubspec.yaml +++ b/code-samples/community/serving/helloworld-dart/pubspec.yaml @@ -2,7 +2,7 @@ name: hello_world_dart publish_to: none # Avoid accidentally publishing this to pub.dev environment: - sdk: ^3.0.0 + sdk: ^3.1.0 dependencies: args: ^2.3.0 @@ -10,6 +10,6 @@ dependencies: shelf_router: ^1.1.0 dev_dependencies: - http: ^0.13.0 - lints: ^2.0.0 + http: ^1.0.0 + lints: ^4.0.0 test: ^1.21.0