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) {
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
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) {
});
setInterval(
);
});