Something to start with.. change ip address to your hub ip
const WebSocket = require('ws');
const ws = new WebSocket('ws://192.168.1.172/logsocket');
ws.on('open', function open() {
// do nothing
});
ws.on('message', function incoming(data) {
console.log(data);
});
running:
example command to save output to file:
nodejs logCaptureExample.js > hubLogs.txt