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