using sharejs doc on server side when saving