Search code examples
androidcouchbasecouchbase-sync-gateway

Couchbase Sync gateway on Windows


I installed sync_gateway for windows from http://www.couchbase.com/nosql-databases/downloads. I am trying to execute command sync_gateway config.json but it gives me an error. How to execute config.json to sync data with android device.

My config.json contains

{
  "interface":":4984",        
  "adminInterface":":4985",
  "log":["REST"],
  "databases":{              
    "sync_gateway":{
    "server":"http://localhost:8091",
    "bucket":"sync_gateway",
    "sync":`function(doc) {channel(doc.channels);}`
    }
  }
}

Solution

    1. Open the file location for the sync_gateway.exe it will be usually in the directory "C:\Program Files (x86)\Couchbase" .
    2. You have to place your configure.json in that directory .
    3. Now open windows command prompt and do 'cd C:\Program Files (x86)\Couchbase' and run the command 'sync_gateway.exe configure.json' . Ensure that your configure.json file is perfect and does not have any syntax errors.

    refer Couchbase,Where to add config.json for windows Installation? for run config.json

    refer Write config.json for sync_gateway