Reputation: 3442
Do i have to use port number to run socket.io or is it possible to access a socket.io in client side without a port number?
https://mydomain.com/chat2.html
NOT https://mydomain.com:3000/chat2.html
i read somewhere to use Nginx but not sure how to implement it, in nodejs! or can i use .htaccess for mirroring domain?
Upvotes: 0
Views: 2327
Reputation: 707328
For http
, if no port number is specified, then the browser defaults to port 80.
For https
, if no port number is specified, then the browser defaults to port 443.
So, if you want to use an https URL without a port number, then your server needs to be listening on port 443 because that is the default port number that the browser will use when no port number is specified in an https URL.
Upvotes: 1