Hello folks and thank you for the amazing work done in the platform ,
I’m reaching out to you today because I’m building a Nestjs application that is composed of:
- An HTTP server on port 4000
- A WS server on port 4001
In order to request the HTTP server, I’m sending requests like https://nestjs-server.com
and in order to connect to the WS server, I would like to connect to wss://nestjs-server.com
.
My problem is that I don’t find a way to redirect the requests coming from the WSS protocol to the internal port 4001.
Right now, with my actual configuration, it’s (hopefully) not working as expected since the request would be routed to the 4000 port:
[[services]]
http_checks = []
internal_port = 4000
processes = ["app"]
protocol = "tcp"
script_checks = []
[services.concurrency]
hard_limit = 25
soft_limit = 20
type = "connections"
[[services.ports]]
force_https = true
handlers = ["http"]
port = 80
[[services.ports]]
handlers = ["tls", "http"]
port = 443
[[services.tcp_checks]]
grace_period = "1s"
interval = "15s"
restart_limit = 0
timeout = "2s"
Do you have an idea how I can tackle this (except by creating a dedicated app for my websocket server )
Thank you so much and have a good one