Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
caracal-js authored Jul 28, 2021
1 parent 70aabb1 commit 0e0eee0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ npm i corrosion
const Corrosion = require('corrosion');
const proxy = new Corrosion();
const http = require('http')
http.createServer((req, res) => proxy.request(req, res)).on('upgrade', (req, socket, head) => proxy.upgrade(req, socket, head)).listen(80);
http.createServer((req, res) =>
proxy.request(req, res) // Request Proxy
).on('upgrade', (req, socket, head) =>
proxy.upgrade(req, socket, head) // WebSocket Proxy
).listen(80);
```
Much more in depth one is in the [demo folder](demo/).

Expand Down

0 comments on commit 0e0eee0

Please sign in to comment.