You are reading a single comment by @J{a}SON and its replies. Click here to read the full conversation.
  • This may be user error, as the espruino websocket server example works when the client is a web browser. when trying to get the client to be a node.js app, i'm having issues.

    this gives the same error from node.js. i can see the blue light flash on the espruino when i run the client, but there is no output in the espruino repl.

    is there an example for espruino websocket server, and node.js client?

    const WebSocket = require('ws');
     
    const ws = new WebSocket('ws://192.168.1.203:8000/');
     
    ws.on('open', function open() {
      ws.send('something');
    });
    
    ws.on('error', function(err) {
        console.log(err);
    })
     
    ws.on('message', function incoming(data) {
      console.log(data);
    });
    
About

Avatar for J{a}SON @J{a}SON started