Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(587)

Unified Diff: lib/devc.dart

Issue 1022923005: bind to localhost instead of all interfaces, and fix closureWrap (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | lib/runtime/dart_runtime.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/devc.dart
diff --git a/lib/devc.dart b/lib/devc.dart
index 5e8d3aac116f132661d6bce9c07b96458f34da12..ca0e55b8ca81341b6747a468a73017f1f184f62a 100644
--- a/lib/devc.dart
+++ b/lib/devc.dart
@@ -241,6 +241,7 @@ class Compiler {
class CompilerServer {
final Compiler compiler;
final String outDir;
+ final String host;
final int port;
final String _entryPath;
@@ -259,12 +260,14 @@ class CompilerServer {
exit(1);
}
var port = options.port;
- _log.fine('Serving $entryPath at http://0.0.0.0:$port/');
+ var host = options.host;
+ _log.fine('Serving $entryPath at http://$host:$port/');
var compiler = new Compiler(options);
- return new CompilerServer._(compiler, outDir, port, entryPath);
+ return new CompilerServer._(compiler, outDir, host, port, entryPath);
}
- CompilerServer._(this.compiler, this.outDir, this.port, this._entryPath);
+ CompilerServer._(
+ this.compiler, this.outDir, this.host, this.port, this._entryPath);
Future start() async {
// Create output directory if needed. shelf_static will fail otherwise.
@@ -275,7 +278,7 @@ class CompilerServer {
.addMiddleware(rebuildAndCache)
.addHandler(shelf_static.createStaticHandler(outDir,
defaultDocument: _entryPath));
- await shelf.serve(handler, '0.0.0.0', port);
+ await shelf.serve(handler, host, port);
compiler.run();
}
« no previous file with comments | « no previous file | lib/runtime/dart_runtime.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698