commit | 3790563dfb72ddf8f23373ad8d9a060919ef5490 | [log] [tgz] |
---|---|---|
author | Kevin Moore <kevmoo@google.com> | Fri Feb 01 20:53:36 2019 -0800 |
committer | Kevin Moore <kevmoo@users.noreply.github.com> | Sat Feb 02 15:31:42 2019 -0800 |
tree | c90515ba18e1c2c6ca8435f9ddcb75295bc5d7ae | |
parent | 5d62bf56ef0118dcf8b7fb747d6a4490ffc7c308 [diff] |
pubspec cleanup
shelf_proxy
is a Shelf handler that proxies requests to an external server. It can be served directly and used as a proxy server, or it can be mounted within a larger application to proxy only certain URLs.
import 'package:shelf/shelf_io.dart' as shelf_io; import 'package:shelf_proxy/shelf_proxy.dart'; void main() { shelf_io.serve(proxyHandler("https://www.dartlang.org"), 'localhost', 8080) .then((server) { print('Proxying at http://${server.address.host}:${server.port}'); }); }