September 2018
Intermediate to advanced
412 pages
11h 12m
English
To run a receiver app on a PC, follow this sequence:
{"name": "receiver","version": "1.0.0","description": "","main": "index.js","scripts": { "start": "node index.js", "test": "echo \"Error: no test specified\" && exit 1"},"author": "","license": "ISC","dependencies": { "ws": "^2.3.1"}}
const WebSocket = require('ws');const wss = new WebSocket.Server({port: 8080}, function () { console.log('Websocket server started');});wss.on('connection', function connection(ws) { ws.on('message', function incoming(message) { console.log('received: ', message); ...