Basically, I have an ESP8266 NodeMcu that connects to a wifi network. An RFID reader is connected and whenever the RFID card is tapped on the reader, an instance of SocketIoClient from ArduinoWebSockets will send an event on the server. I manage to make it work in nodejs socket.io server deployed in heroku, but I cannot connect it to my server deployed to fly.io.
This is my code in my .ino file.
const char *server = "sbca-server.fly.dev";
inside the setup
webSocket.begin(server, 8080);
I am thinking that the problem here is the port of the server in fly.io.
because it works in Heroku using port 80.
const char *server = "sbca-server.herokuapp.com";
setup(){
webSocket.begin(server, 80);
}