get webserver and WS middleware talking
move sockets code into its own js