File tree 5 files changed +19
-22
lines changed 5 files changed +19
-22
lines changed Original file line number Diff line number Diff line change 1
1
language : dart
2
2
3
3
dart :
4
- - 2.1.0
4
+ - 2.1.1
5
5
- dev
6
6
7
7
dart_task :
Original file line number Diff line number Diff line change @@ -9,13 +9,12 @@ import 'package:http_multi_server/http_multi_server.dart';
9
9
import 'package:shelf/shelf.dart' as shelf;
10
10
import 'package:shelf/shelf_io.dart' as shelf_io;
11
11
12
- void main() {
12
+ void main() async {
13
13
// Both http://127.0.0.1:8080 and http://[::1]:8080 will be bound to the same
14
14
// 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!");
19
18
});
20
19
}
21
20
```
Original file line number Diff line number Diff line change @@ -4,8 +4,6 @@ analyzer:
4
4
implicit-casts : false
5
5
linter :
6
6
rules :
7
- - avoid_empty_else
8
- - avoid_init_to_null
9
7
- avoid_null_checks_in_equality_operators
10
8
- avoid_unused_constructor_parameters
11
9
- annotate_overrides
@@ -15,30 +13,18 @@ linter:
15
13
- constant_identifier_names
16
14
- control_flow_in_finally
17
15
- directives_ordering
18
- - empty_catches
19
- - empty_constructor_bodies
20
16
- empty_statements
21
17
- hash_and_equals
22
18
- implementation_imports
23
19
- iterable_contains_unrelated_type
24
- - library_names
25
- - library_prefixes
26
20
- list_remove_unrelated_type
27
21
- non_constant_identifier_names
28
22
- overridden_fields
29
23
- package_api_docs
30
24
- package_names
31
25
- package_prefixed_library_names
32
- - prefer_equal_for_default_values
33
26
- prefer_final_fields
34
27
- prefer_generic_function_type_aliases
35
- - prefer_is_not_empty
36
- - slash_for_doc_comments
37
28
- test_types_in_equals
38
29
- throw_in_finally
39
- - type_init_formals
40
30
- 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 7
7
homepage : https://github.com/dart-lang/http_multi_server
8
8
9
9
environment :
10
- sdk : ' >=2.1.0 <3.0.0'
10
+ sdk : ' >=2.1.1 <3.0.0'
11
11
12
12
dependencies :
13
13
async : ' >=1.2.0 <3.0.0'
14
14
15
15
dev_dependencies :
16
16
http : ^0.12.0
17
- pedantic : ^1.4 .0
17
+ pedantic : ^1.8 .0
18
18
test : ^1.5.2
You can’t perform that action at this time.
0 commit comments