Write new entries to the file (change the format slight to make each line a separate JSON object)
Refactor the server code into a separate package