How can I use two ports(https&WS) in same service.
I currently have a service that only use one port related to http service(and listen to env.PORT), but I want to add a Websocket port in the same service. I know how to use one port, but I dont know how to listen to another port in the same service. Do you guys have some experience on that?
7 Replies
Project ID:
N/A
N/A
it's not possible at the moment, you can only expose port 443 externally for https
ok, got it. Thanks.
And Can I use WSS in the same port working with http port?
yes, http and websockets don't need to run on separate ports
websockets is an http transport after all
Ok, very appreciate your replies.
no problem 🙂