Server code for the TreeNotes application