So grateful，and so funny
I didn’t think at all to try it without ports
but it really dont need a port to link
I was tormented by it
replit should tell every rookie like me this info.
but it worked in node.js client ,and not working on my computer with c#
When I remove it as you suggested，i got an error: ’ TypeError: One and only one of the “port”, “server”, or “noServer” options must be specified’
there must be one parameter at least…
and another error is : ‘TypeError: wss.listen is not a function’
it means that the method you gave me doesn’t seem to exist…Do you know which ‘ws’ I’m using
maybe i I did it wrong somewhere. I’m just getting started with node.js in replit
You don’t need to do a DNS lookup for the repl’s IP (just use the hostname for the websocket URL), and you should be using wss://, not ws://. Are you following some kind of tutorial? If so, you might want to find a different tutorial.
you are right
I should use the domain name, not the IP and should not use the port.In fact, it doesn’t matter which port the server listens on, all be ok that I try several casually. I didn’t read the tutorial, so my writing was very irregular. I just don’t understand why you all know that 443 is the default, but I got the official documents are written in 5900 and 8099. But it doesn’t matter, it seems that any port is unnecessary, it can be used.ffffuny.