From d7995feca3d31e6f97e900e2f1fd9099b3cde017 Mon Sep 17 00:00:00 2001 From: Praveen Ravichandran Date: Sat, 23 Jan 2021 18:42:52 -0500 Subject: [PATCH] Add src files --- src/index.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/index.js diff --git a/src/index.js b/src/index.js new file mode 100644 index 0000000..3780c9e --- /dev/null +++ b/src/index.js @@ -0,0 +1,12 @@ +const WebSocket = require('ws'); + +const wss = new WebSocket.Server({ + port: 3000 +}); + +wss.on('connection', (ws) => { + console.log('New User Connected'); + ws.on('message', (data) => { + console.log(data); + }); +}); \ No newline at end of file