Skip to content

Instantly share code, notes, and snippets.

@furkancelik
Created Aug 25, 2016
Embed
What would you like to do?
var WebSocketServer = require('ws').Server
, wss = new WebSocketServer({ port: 8083 });
wss.on('connection', function connection(ws) {
ws.on('message', function incoming(message) {
console.log('received: %s', message);
// ws.send("message");
ws.send(message);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment