Update test-app/bin/main.dart with dart:io V2 #14

Merged
merged 2 commits into from Mar 5, 2013

Conversation

Projects
None yet
2 participants
Contributor

nfrancois commented Mar 4, 2013

The demo code has warning with dart:io v1

@sethladd sethladd commented on an outdated diff Mar 5, 2013

test-app/bin/main.dart
- server.listen('0.0.0.0', port);
- print('Server started on port: ${port}');
-
- server.defaultRequestHandler = (HttpRequest request, HttpResponse response) {
-
- var resp = JSON.stringify({
- 'Dart on Heroku': true,
- 'Buildpack URL': 'https://github.com/igrigorik/heroku-buildpack-dart',
- 'Environment': Platform.environment}
- );
-
- response.headers.set(HttpHeaders.CONTENT_TYPE, 'application/json');
- response.outputStream.writeString(resp);
- response.outputStream.close();
- };
+ HttpServer.bind('0.0.0.0', port).then((HttpServer server){
@sethladd

sethladd Mar 5, 2013

Collaborator

Please add a space before {

Collaborator

sethladd commented Mar 5, 2013

Thanks! One small nit

Contributor

nfrancois commented Mar 5, 2013

The space before is fixed

Collaborator

sethladd commented Mar 5, 2013

lgtm Thanks!

@sethladd sethladd added a commit that referenced this pull request Mar 5, 2013

@sethladd sethladd Merge pull request #14 from nfrancois/updateDartIO
Update test-app/bin/main.dart with dart:io V2
74a7c02

@sethladd sethladd merged commit 74a7c02 into igrigorik:master Mar 5, 2013

@sethladd sethladd added a commit that referenced this pull request Jan 7, 2014

@sethladd sethladd Merge pull request #14 from nfrancois/updateDartIO
Update test-app/bin/main.dart with dart:io V2
dc26003
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment