-
Hello, It's me again with a weird problem (again :D) I'm using expressJS for so long it would be horrible to rewrite down all our stuff (stable and secure so far), on one of our server we are using both express and uWS (only websockets). So far I was using two port listener, but this is causing issues on production. Or, it could be seen that way https://medium.com/factory-mind/websocket-node-js-express-step-by-step-using-typescript-725114ad5fe4 (that's the way we are using uWS so far). The best "low level" example I found is that one: https://github.com/websockets/ws#multiple-servers-sharing-a-single-https-server Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
This was how old (v14 and prior) versions worked. They shared the http server with nodejs via various hacks. Today everything above v14 is completely standalone from nodejs and works in foreign environments like Python. This means you either move both http and ws to uWS or you listen to many ports. So new versions of uWS are more like a complete replacement to both Express and Socket.IO rather than a particular low level component of them |
Beta Was this translation helpful? Give feedback.
-
Yes ok! No problems, I guessed it would be that way (for the best I guess). Thanks for the quick answer 👍 |
Beta Was this translation helpful? Give feedback.
This was how old (v14 and prior) versions worked. They shared the http server with nodejs via various hacks.
Today everything above v14 is completely standalone from nodejs and works in foreign environments like Python.
This means you either move both http and ws to uWS or you listen to many ports.
So new versions of uWS are more like a complete replacement to both Express and Socket.IO rather than a particular low level component of them