Snippets

Popina Sync Gateway Config File 104.155.33.203

Created by Thomas Hebert
{
 "interface":":4984",
 "adminInterface":":4985",
 "log": ["*"],
   "databases": {
    "database": {
     "server":"http://104.155.33.203:8091/",
     "bucket":"default",
     "users": {
      "GUEST": {"disabled": true, "admin_channels": ["*"]}
      },
      "sync":`
function (doc, oldDoc) {
     if (!doc.owner) throw({forbidden : "Documents must have a owner"});

     var webChannelForOwner = 'webFor_' + doc.owner;
     var mobileChannelForOwner = 'mobileFor_' + doc.owner;

     var channels = [mobileChannelForOwner, webChannelForOwner];

     channel(channels);
 }
 `
   }
 }
}

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.