commit | ccd311f64d8689e7a145d703ba267975d6df9e28 | [log] [tgz] |
---|---|---|
author | Kevin Moore <kevmoo@users.noreply.github.com> | Fri Mar 12 09:49:57 2021 -0800 |
committer | GitHub <noreply@github.com> | Fri Mar 12 09:49:57 2021 -0800 |
tree | 1703ce12642d1cd03c958fee9a7a13f0a3122f0a | |
parent | 8dee6edb768ff0ab8c154cefc1bc40dc643756bf [diff] |
enable null safety (#23) Also remove lint redundant with latest pedantic – and add a few favorites Co-authored-by: Nate Bosch <nbosch@google.com>
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() async { var server = await shelf_io.serve( proxyHandler("https://dart.dev"), 'localhost', 8080, ); print('Proxying at http://${server.address.host}:${server.port}'); }