You are reading a single comment by @user105886 and its replies. Click here to read the full conversation.
  • I'm trying to start a websocket server through the ESP8266 but keep receiving an error saying that Constructor should be a function and not undefined. This is my code after connecting the ESP to wifi. What is going wrong here? I have node and ws installed through terminal.

    var WebSocketServer = require('ws').Server,
    wss = new WebSocketServer({port:8080});

    wss.on('connection', function (wss) {
    wss.on('message', function (message) {

    console.log('received: %s', message);



    () => ws.send(`${new Date()}`),



Avatar for user105886 @user105886 started