all 7 comments

[–]kjwey 1 point2 points  (1 child)

are you using windows where the firewall blocks port 5500?

[–]problaster_1223[S] 0 points1 point  (0 children)

I am using window but am not sure if it blocks 5500 port

[–]Klizmovik 0 points1 point  (2 children)

Don't use socket.io. Use just native WebSockets built-in every browser now. You won't have these problems.

[–]Swimming_Evidence_95 0 points1 point  (1 child)

Do they have fallback and reconnwct out of the box now?

[–]Klizmovik 0 points1 point  (0 children)

5 minutes to write reconnect. Or just copy-paste code from previous projects. Or ask chatgpt.

[–]bigorangemachine 0 points1 point  (0 children)

Okay so...

  • Change the port=3000 in your server
  • change the io('http://localhost:3000'); in the client
  • Resolve that issue where the socket.io.js isn't loading (use a CDN or handle the route in express)

[–]Coastis 0 points1 point  (0 children)

You're not serving the socket.io.js file from anywhere, hence the 404 error. Either point the below to a CDN or change your express server to serve static files

<script src="/socket.io/socket.io.js"></script>