Skip to content

Commit

Permalink
[doc] note in readme about middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
dominictarr committed Aug 2, 2011
1 parent d3c0697 commit b5d5eaa
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Expand Up @@ -312,6 +312,16 @@ https.createServer(options.https, function (req, res) {
res.end();
}).listen(8000);
```
## Middleware

`node-http-proxy` now supports connect middleware. Add middleware functions to your createServer call:

``` js
httpProxy.createServer(
require('connect-gzip').gzip(),
9000, 'localhost'
).listen(8000);
```

## Proxying WebSockets
Websockets are handled automatically when using the `httpProxy.createServer()`, but if you want to use it in conjunction with a stand-alone HTTP + WebSocket (such as [socket.io][5]) server here's how:
Expand Down

0 comments on commit b5d5eaa

Please sign in to comment.