commit | 2a0a5224e5b31e95a3a2f97f67346e8c73f66779 | [log] [tgz] |
---|---|---|
author | Kevin Moore <github@j832.com> | Thu Jul 03 12:01:38 2014 -0700 |
committer | Kevin Moore <github@j832.com> | Thu Jul 03 12:01:38 2014 -0700 |
tree | a80831ea543d6b15d2cd8f3bf731a8f35a86fd0f | |
parent | 27085656221156c30e4f71dfe72976adfea5ccf2 [diff] |
v0.1.0 A number of updates from @nex3
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}'); }); }