Last active
February 10, 2016 01:34
-
-
Save edrex/9863fb4aa68d65229542 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| localhost | |
| log access.log | |
| proxy /echo http://127.0.0.1:2016 { | |
| websocket | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"/> | |
| </head> | |
| <body> | |
| <script> | |
| function testEchoSocket(path) { | |
| var s = new WebSocket('ws://'+location.hostname+':'+location.port + path); | |
| s.onmessage = function (event) { | |
| console.log(event.data); | |
| } | |
| s.onopen = function (event) { | |
| s.send("ohai"); | |
| } | |
| } | |
| testEchoSocket('/echo'); | |
| </script> | |
| </body> | |
| </html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| localhost | |
| log access.log | |
| websocket /echo cat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment