washo4evr / Socket.io-v1.x-Library

Socket.io Library for Arduino
108 stars 58 forks source link

Cannot GET /socket.io/1/?transport=polling&b64=true #31

Closed dunklesToast closed 5 years ago

dunklesToast commented 7 years ago

Hey,

I just wanted to connect my ESP8266 to my NodeJS SocketIO Server. I changed the IP so it matches the right one and I did the same with the port.

Now I am getting this error: Cannot GET /socket.io/1/?transport=polling&b64=true Trying to reach socket io serverHTTP/1.1 404 Not Found X-Content-Type-Options: nosniff Content-Type: text/html; charset=utf-8 Content-Length: 56 Date: Sun, 13 Nov 2016 01:25:32 GMT Connection: keep-alive

My Server looks like this:

` var app = require('express')(); var http = require('http').Server(app); var io = require('socket.io')();

io.on('connection', function (socket) { console.log("A Device connected!"); socket.on('welcome', function (data) { console.log(data + " is now connected!"); }); });

http.listen(7331, function(){ console.log('listening on *:7331'); }); `

I am using the newest version from socket.io and this lib.

Hope you can help me to fix,

dunklesToast

washo4evr commented 7 years ago

hi,

just to be sure, which version of socket.io are you using? could you also post your ESP8266 code?