commit | f0cf769047dba7938467801c909ecbdef910139c | [log] [tgz] |
---|---|---|
author | Kevin Moore <github@j832.com> | Thu Jul 03 12:15:34 2014 -0700 |
committer | Kevin Moore <github@j832.com> | Thu Jul 03 12:15:34 2014 -0700 |
tree | 728a26f3efa891f3e0023fbb186fb2884632492c | |
parent | 2a0a5224e5b31e95a3a2f97f67346e8c73f66779 [diff] |
use example.com for doc comments sample
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}'); }); }