platform/README.md
2017-04-22 15:00:38 -04:00

847 B

angel_proxy

version 1.0.5 build status

Angel middleware to forward requests to another server (i.e. pub serve).

import 'package:angel_proxy/angel_proxy.dart';

main() async {
  // ...
  
  // Forward requests instead of serving statically
  await app.configure(new ProxyLayer('localhost', 3000));
  
  // Or, use one for pub serve.
  //
  // This automatically deactivates itself if the app is
  // in production.
  await app.configure(new PubServeLayer());
}

If your app's storeOriginalBuffer is true, then request bodies will be forwarded as well, if they are not empty. This allows things like POST requests to function.