You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the docs, const expressWs = require('express-ws')(app); means that expressWS will use the server that is created automatically when you call app.listen .
So there is an http server for the expressWs to work with.
My question is, if express-ws creates multiple WS servers, then those will share the same http server. If this is true, then we run into the ws issue described here .
If express-ws does not create multiple WS servers, then there is no issue at all, since there is only one single WS server for an http server.
Which one is it ? Does express-ws creates by default one or multiple WS servers ?
Please excuse me if my question is out of place, I am trying to understand how express-ws works and avoid potential errors and issues.
Thanks
The text was updated successfully, but these errors were encountered:
Websocket newbie here. I managed to set up express-ws in my already existing node/express project.
This is how I do it
Everything works fine.
According to the docs,
const expressWs = require('express-ws')(app);
means that expressWS will use the server that is created automatically when you callapp.listen
.So there is an http server for the expressWs to work with.
My question is, if express-ws creates multiple WS servers, then those will share the same http server. If this is true, then we run into the ws issue described here .
If express-ws does not create multiple WS servers, then there is no issue at all, since there is only one single WS server for an http server.
Which one is it ? Does express-ws creates by default one or multiple WS servers ?
Please excuse me if my question is out of place, I am trying to understand how express-ws works and avoid potential errors and issues.
Thanks
The text was updated successfully, but these errors were encountered: