Socket.io based server is inaccessalbe to socket connections, but the troubleshooting link works

Viewed 16

Pretty much, my socket.io server lets me access <the server URL>/socket.io/?EIO=4&transport=polling (which is the troubleshooting step in the docs), but it doesn't let me connect to the websocket normally.

This happens when I try to connect to the websocket in postman: Pic1

Here is my code:


let server = require('http').createServer()

const io = require('socket.io')(server)

server.listen(5000)

console.log('init complete')

I've rewritten this using multiple tutorials online to MAKE SURE it's right, but no matter what I follow it just doesn't work.

0 Answers
Related