initialized socket.io api