commit | 5675c97fa64b7f331db691b085a515173b832c30 | [log] [tgz] |
---|---|---|
author | Natalie Weizenbaum <nweiz@google.com> | Fri Aug 17 15:18:20 2018 -0700 |
committer | GitHub <noreply@github.com> | Fri Aug 17 15:18:20 2018 -0700 |
tree | 53228a5a184f9b57a5068a58235c8948ec927e72 | |
parent | ae5c1297794e2178ee6dda8841fd4beb26c90c2a [diff] |
Release 0.1.0+4 (#8)
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}'); }); }