Skip to content

Commit

Permalink
Add src files
Browse files Browse the repository at this point in the history
  • Loading branch information
pravinba9495 committed Jan 23, 2021
1 parent b3ba281 commit d7995fe
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -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);
});
});

0 comments on commit d7995fe

Please sign in to comment.