moved socket io into js lib