Check out my generic websocket server that relays data and logs connections/messages sent all in the terminal. It's part of hubble, an open source project I wrote a year or so ago which is a terminal based dashboard.
Andromeda - a simple websocket server | Heykuki News