Created
July 27, 2017 04:03
-
-
Save bradurani/15b59b56ae3d1d1e509d363b0a9553c8 to your computer and use it in GitHub Desktop.
This file contains 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
const WebSocket = require('ws'); | |
const server = new WebSocket.Server({ port: 8080 }); | |
server.on('connection', function connection(ws) { | |
ws.send('connected') | |
ws.on('message', function incoming(message) { | |
ws.send('something'); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment