Last active
November 30, 2021 19:44
-
-
Save Youka/9f33ec37e29096a82f0c6ea806ae8328 to your computer and use it in GitHub Desktop.
Websocket echo server
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
new (require('ws').Server)({port:8080}).on('connection',sock=>sock.on('message',data=>sock.send(String(data)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Install NodeJS, call
npm i ws && node .
and connect tows://localhost:8080
(f.e. by Weasel).