R
Railway•13mo ago
BruceX

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
Percy
Percy•13mo ago
Project ID: N/A
BruceX
BruceXOP•13mo ago
N/A
Brody
Brody•13mo ago
it's not possible at the moment, you can only expose port 443 externally for https
BruceX
BruceXOP•13mo ago
ok, got it. Thanks. And Can I use WSS in the same port working with http port?
Brody
Brody•13mo ago
yes, http and websockets don't need to run on separate ports websockets is an http transport after all
BruceX
BruceXOP•13mo ago
Ok, very appreciate your replies.
Brody
Brody•13mo ago
no problem 🙂
Want results from more Discord servers?
Add your server