File tree Expand file tree Collapse file tree 5 files changed +19
-22
lines changed
Expand file tree Collapse file tree 5 files changed +19
-22
lines changed Original file line number Diff line number Diff line change 11language : dart
22
33dart :
4- - 2.1.0
4+ - 2.1.1
55 - dev
66
77dart_task :
Original file line number Diff line number Diff line change @@ -9,13 +9,12 @@ import 'package:http_multi_server/http_multi_server.dart';
99import 'package:shelf/shelf.dart' as shelf;
1010import 'package:shelf/shelf_io.dart' as shelf_io;
1111
12- void main() {
12+ void main() async {
1313 // Both http://127.0.0.1:8080 and http://[::1]:8080 will be bound to the same
1414 // server.
15- HttpMultiServer.loopback(8080).then((server) {
16- shelf_io.serveRequests(server, (request) {
17- return new shelf.Response.ok("Hello, world!");
18- });
15+ var server = await HttpMultiServer.loopback(8080);
16+ shelf_io.serveRequests(server, (request) {
17+ return shelf.Response.ok("Hello, world!");
1918 });
2019}
2120```
Original file line number Diff line number Diff line change @@ -4,8 +4,6 @@ analyzer:
44 implicit-casts : false
55linter :
66 rules :
7- - avoid_empty_else
8- - avoid_init_to_null
97 - avoid_null_checks_in_equality_operators
108 - avoid_unused_constructor_parameters
119 - annotate_overrides
@@ -15,30 +13,18 @@ linter:
1513 - constant_identifier_names
1614 - control_flow_in_finally
1715 - directives_ordering
18- - empty_catches
19- - empty_constructor_bodies
2016 - empty_statements
2117 - hash_and_equals
2218 - implementation_imports
2319 - iterable_contains_unrelated_type
24- - library_names
25- - library_prefixes
2620 - list_remove_unrelated_type
2721 - non_constant_identifier_names
2822 - overridden_fields
2923 - package_api_docs
3024 - package_names
3125 - package_prefixed_library_names
32- - prefer_equal_for_default_values
3326 - prefer_final_fields
3427 - prefer_generic_function_type_aliases
35- - prefer_is_not_empty
36- - slash_for_doc_comments
3728 - test_types_in_equals
3829 - throw_in_finally
39- - type_init_formals
4030 - unnecessary_brace_in_string_interps
41- - unnecessary_const
42- - unnecessary_new
43- - unrelated_type_equality_checks
44- - valid_regexps
Original file line number Diff line number Diff line change 1+ import 'package:http_multi_server/http_multi_server.dart' ;
2+ import 'package:shelf/shelf.dart' as shelf;
3+ import 'package:shelf/shelf_io.dart' as shelf_io;
4+
5+ void main () async {
6+ // Both http://127.0.0.1:8080 and http://[::1]:8080 will be bound to the same
7+ // server.
8+ var server = await HttpMultiServer .loopback (8080 );
9+ shelf_io.serveRequests (server, (request) {
10+ return shelf.Response .ok ("Hello, world!" );
11+ });
12+ }
Original file line number Diff line number Diff line change 77homepage : https://github.com/dart-lang/http_multi_server
88
99environment :
10- sdk : ' >=2.1.0 <3.0.0'
10+ sdk : ' >=2.1.1 <3.0.0'
1111
1212dependencies :
1313 async : ' >=1.2.0 <3.0.0'
1414
1515dev_dependencies :
1616 http : ^0.12.0
17- pedantic : ^1.4 .0
17+ pedantic : ^1.8 .0
1818 test : ^1.5.2
You can’t perform that action at this time.
0 commit comments