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