-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
To enable running a websocket server on an already existing http(s) server (like an express server), consider passing in an optional server instance
I would propose allowing a server instance in WSServerOptions
export interface WSServerOptions extends TlsOptions {
type: "websocket";
port?: number; // default 13900 (ws) or 13901 (wss)
server?: http.Server | https.Server; //optional server to pass in
}
And using that in startWebSocketServer or creating one if not given
This allows running http and ws over the same port as the rest of the application
Thoughts?
Metadata
Metadata
Assignees
Labels
No labels