update server.js to accept jsonArray of notifications