Converted from regular http server to websocket server