WebSocket
StartupJS lets you hook into the underlying HTTP server and upgrade specific paths to WebSocket connections.
Upgrade a custom endpoint
The important part is calling session(req, {}, ...) so the upgraded socket shares the same session data as the rest of the app.