Run paired with a Node http/https server? #59
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Is there a way to hand ws an
http.createServer()/https.createServer()instance, so that a server can handle (limited) HTTP traffic in addition to upgrading a connection to a websocket connection on a specific route?For instance:
So we have a simple secure http server, with a route that clients can use when creating websockets in order to set up the two way persistent connection, while also being able to load up (for example) a lobby page on the
/route that gives them information on who else is already connected, a button that starts their own websocket client code, etc.Especially for debugging and administration, being able to generate a webpage that shows the current server state on the same address and port (but not path), rather than using a separate server entirely, is fairly crucial.