Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added Readme

  • Loading branch information...
commit 59e2945dc617ed83efc2f070b082661cf126c0d6 1 parent 10a7b1d
@wankdanker authored
Showing with 30 additions and 0 deletions.
  1. +30 −0 Readme.md
View
30 Readme.md
@@ -0,0 +1,30 @@
+# Connect Proxy
+
+Proxy a request to another server
+
+# Usage
+
+ proxy(host, port);
+
+# Example
+
+ var connect = require('connect')
+ , proxy = require('connect-proxy')
+ , app = connect.createServer();
+
+ app.use('/images', proxy('internal-image-cluster.mysite.com'));
+ app.use('/thumbs', proxy('internal-thumb-generator.mysite.com'));
+ app.use('/legacy', proxy('some-old-iis-app.mysite.com', 8080));
+
+ app.listen(3000);
+
+# My Use Case
+
+I have been in the process of converting our existing web applications to node.
+In my connect routes my last ditch effort to handle a request unhandled by any
+other middleware is to proxy it to a legacy backend server which serves up the
+old version of the application.
+
+That way I can migrate portions of the existing application piece by piece and
+register routes for those bits which have been migrated. If the URL is
+unhandled then it seamlessly gets passed to a backend server.
Please sign in to comment.
Something went wrong with that request. Please try again.