Moved socket.io logic from app.js to socket.js route