I change the port number in main.cpp to
AsyncWebServer(89)
after this change, I can call the webpage of Slider webserverver esp8266 by typing the follow ip adress
http://xxx.xxx.xxx.xx:89 but then I change the slider the brightness of the led do not change
in the serial monitor i see no connection to the client
is it possible to change the port number in slider webserver ?
Thank you for your help
best regards
Werner
Hi Werner.
I think you should also change the WebSocket port on the JavaScript file.
var gateway = `ws://${window.location.hostname:89}/ws`;
I haven’t tried it. But I think the solution should be something like that.
I hope this helps.
Regards,
Sara
Hallo Sara
No, it doesn’t work
I get a Syntax-Error In VS Code
but I also think the Error must be in the Java File
Thank you
Werner
Hi.
I’m sorry, my mistake.
This is the correct syntax.
var gateway = `ws://${window.location.hostname}:89/ws`;
I’ve tried it and it worked.
Regards,
Sara