code: function writeMessage(db, readerUuid, messageJson) {
    var time = new Date().getTime();
    var writeObject = {
      uuid: readerUuid,
      time: time,
      data: messageJson
    };
    var transaction = db.transaction([OBJECT_STORE_ID], 'readwrite');
    return new Promise(function (res, rej) {
      transaction.oncomplete = function () {
        return res();
      };
  
      transaction.onerror = function (ev) {
        return rej(ev);
      };
  
      var objectStore = transaction.objectStore(OBJECT_STORE_ID);
      objectStore.add(writeObject);
    });
  }
docs: writes the new message to the database
  so other readers can find it