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
// server.js | |
// To run on 2 EC2 Instances with sudo privilages | |
// $ sudo nodejs server.js | |
const WebSocket = require('ws'); | |
const wss = new WebSocket.Server({port: 80}); | |
wss.on('connection', function connection(ws) { | |
for(i=0; i<100000;i++) { |