commit | 4ba3ac33b3b9ba6ebbc0d39cd6780b0cd7eb5cef | [log] [tgz] |
---|---|---|
author | Kevin Moore <github@j832.com> | Thu Jul 31 15:44:39 2014 -0700 |
committer | Kevin Moore <github@j832.com> | Thu Jul 31 15:44:39 2014 -0700 |
tree | 6292865c40be22228cbbb1d06a271736b2429bae | |
parent | f0cf769047dba7938467801c909ecbdef910139c [diff] |
shelf_proxy: added a drone.io badge to readme R=nweiz@google.com Review URL: https://codereview.chromium.org//432983002
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}'); }); }