server: fix socket.io issue with require.js using, inject socket.io client into fileSync
clean up code style