startProxyServer function
Starts a server at uri
proxying requests to buildRunnerUri
.
This needs some understanding of package: shelf
.
Implementation
Future<Null> startProxyServer(Uri uri, Uri buildRunnerUri,
[Pipeline pipeline = const Pipeline()]) async {
final handler = shelfProxy.proxyHandler(buildRunnerUri);
final server =
await io.serve(pipeline.addHandler(handler), uri.host, uri.port);
new Logger(loggers.proxy).info(
'Running Proxy server at http://${server.address.host}:${server.port}');
}