Skip to content

Instantly share code, notes, and snippets.

@ntotten
Created August 30, 2012 20:13
Show Gist options
  • Select an option

  • Save ntotten/3539752 to your computer and use it in GitHub Desktop.

Select an option

Save ntotten/3539752 to your computer and use it in GitHub Desktop.
Using Node.js on Windows Azure as a WebSocket server for Windows 8 Store Apps
var WebSocketServer = require('ws').Server
, wss = new WebSocketServer({port: process.env.PORT});
wss.on('connection', function(ws) {
ws.on('message', function(message) {
console.log('received: %s', message);
});
ws.send('something');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment